You are using an unsupported browser. Please update your browser to the latest version on or before July 31, 2020.
Welcome to the CAREWare FAQ Page
announcement close button
Home > CAREWare > Restoring attachments after migrating the database
Restoring attachments after migrating the database
print icon

In some cases, users are unable to view attachments or add new attachments upgrading from CAREWare 5 to CAREWare 6. This can happen if the CAREWare database was moved to a new server. 

To fix these issues, restore the cw_attachments database and create the database connection string for cw_attachments by following these instructions:

  1. Create a backup of the cw_attachments database from the CAREWare 5 database instance.
  2. Move the backup file to the SQL Server Restore from Directory or any file folder to which the CAREWare 6 SQL Server database instance has permission to read and write.
  3. Verify if the cw_attachments database has already been created by checking the database instance databases.


  1. Verify that the setting in CAREWare matches the current state by checking to see if attachmentDBCreated is one or zero.


If there is no cw_attachments database listed under databases and the setting for attachmentDBCreated = 1, then change that setting to 0. If there is a cw_attachments database and the attachmentDBCreated setting is 0, then change that setting to 1.

To change the attachmentDBCreated settings:

  1. Click Server Settings.
  2. Click Stop Server.
  3. Click Common Storage Settings.
  4. Click cmm_st_pk to set the list in alphabetical order.
  5. Go to attachmentDBCreated.
  6. Change the cmm_st_number to the needed setting: 0 or 1.
  7. Click Server Settings.
  8. Click Start Server.

If there was no cw_attachments database and the setting has been changed to zero, create the attachments database by adding an attachment record and then deleting that record. Once the attachment has been added to a client, the cw_attachments database should be created, the attachmentDCCreated setting should be set to 1, and the database connection string for cw_attachments should be created. Now the cw_attachments database can be restored.

To restore the cw_attachments database:

  1. Click Server Settings.
  2. Click Stop Server.
  3. Connect to CAREWare 6 database instance.
  4. Right click the database instance.
  5. Click Restart.
  6. Expand databases.
  7. Right click cw_attachments.
  8. Restore the cw_attachments database under tasks.
  9. Run this query: use cw_attachments Exec sp_changedbowner 'cwbt'
  10. Go back to the CW Admin.
  11. Click Start Server.
  12. Verify users can view and add attachments in CAREWare.
0 out of 0 found this helpful


scroll to top icon