Instructions for moving the MessageStats Database to another SQL Server and then upgrading it to a new version.
Backup the MessageStats database:
1. Start SQL Enterprise Manager on the source machine.
2. Expand the databases node.
3. Right-click on the MessageStats database and select All Tasks | Backup Database.
4. Under the Destination section of the backup database window, click the Add button.
5. Choose a name for the MessageStats database backup (i.e. MessageStatsDb.bak) in the File name field.
6. Ensure the Overwrite Media option is set (This is in the Overwrite section of the backup window).
7. Click OK from the backup database window.
Restore the MessageStats database from a backup:
1. Start SQL Enterprise Manager on the destination machine.
2. Right-click on the databases node and select All Tasks | Restore Database.
3. Type MessageStats in the [Restore as database:] field on the Restore database window.
4. Under the Restore section of the backup database window, choose the [From device] option.
5. Click on Select Devices.
6. Click the Add button to choose the backup file (choose the file that you just created).
7. Click OK a few times until you return to the Restore database window.
8. Click OK from the Restore database window to restore the database.
To ensure that security is properly setup on the IIS Server, open Regedit and edit the HKLM\Software\Quest Software\MessageStats\Client DB value to reflect the new SQL Server Computer Name.
To ensure that the MessageStats Console will connect to the new SQL Server, edit the MessageStats.ini file, found in Program Files\Quest Software\MessageStats, to reflect the new SQL Server Computer Name.
To do this "Detach" the database and then move the database files to the new location. Then attach the database to the files in their new location.
Steps to perform this action:
1. Back up your data
2. Open Enterprise Manager
3. Right-click on the 'Databases' folder and select 'Properties'
4. Select the 'Data Files' tab
5. Take a note of the file name. By looking in the file path you will see the whole file name. ie: MessageStatsUpgDat.mdf
6. Select the 'Transaction Log' tab
7. Take a note of the file name. By looking in the file path you will see the whole file name. ie: MessageStatsUpgDat_Log.mdf
8. Click on 'Cancel' to close the window
9. Right-click once again on the ''MessageStats' database | All Tasks | Detach Database...
10. Click on the 'Clear' button if there are connections using this database
11. If clicking on 'Clear' a dialogue box will be displayed stating "This will end all active transactions in this database which is required before the database can be detached. Is it OK to proceed?". Click on the "OK" button.
12. A new dialogue box may display stating "Do you want to notify the currently connected users that their sessions in the database will be ended?" Select the "Yes" button
13. In the 'Detach Database dialogue box the STATUS should state "The database is ready to detach"
14. Click the "OK" button
15. A new dialogue box should display stating "Detaching database has completed successfully". Click on the "OK" button
16. Navigate to Program Files\Microsoft SQL Server\MSSQL\Data\ and move the MessageStatsUpgDat.mdf and the MessageStatsUpgDat_Log.mdf files to the new location.
17. Right-click on 'Databases' in Enterprise Manager and navigate to All Tasks | Attach Database... Click on the "..." button
18. Navigate to where the MessageStatsUpgDat.mdf and the MessageStatsUpgDat_Log.mdf files are now residing and select the MessageStatsUpgDat.mdf.
19. Click on the "OK" button
20. The "Attach Database - [Servername]" dialogue box should display showing the database information
21. Click on the "OK" button
22. A dialogue should display stating "Attaching database has completed successfully."
23. Click the "OK" button and exit out of Enterprise Manager
24. Now installed MessageStats version to upgrade the database
25. Confirm the MessageStats Console connects successfully.