Backing Up Your SQL Server Databases for MDM

2/9/2009

To move MDM databases onto another SQL Server computer, or for general database backup and restore operations, you must restore the full databases onto a new SQL Server computer.

To restore the MDM databases onto a separate SQL Server computer

  1. Stop all of the MDM services:

    • SCMDM ADGP service
    • SCMDM Enrollment service
    • SCMDM GCM service
    • SCMDM Password Recovery service
    • SCMDM Software Distribution service
    • SCMDM Wipe service
  2. Start Microsoft SQL Server Management Studio and connect to the local SQL Server.

  3. In SQL Server Management Studio, expand the local server, expand Databases, right-click AdminServices, point to Tasks, and then select Backup.

  4. In the Back Up Database - AdminServices dialog box, make sure that the Backup type is set to Full, note the backup Destination folder, and then select OK.

  5. In the Microsoft SQL Server Management Studio dialog box informing you that the backup completed successfully, select OK.

  6. Repeat steps 3 through 5 for each of the MDM databases:

    • AdminServices (completed with the steps above)
    • MobileEnrollment
    • TEEDB
    • SUSDB
  7. In SQL Server Management Studio, click the New Query button in the upper left.

  8. In the query window on the right, type the following:

    BACKUP SERVICE MASTER KEY TO FILE = 'C:\filename.bak'
    ENCRYPTION BY PASSWORD = 'password!1'
    
  9. In SQL Server Management Studio, click the Execute button to run the query.

  10. In SQL Server Management Studio, expand SQL Server Agent, and then select Jobs.

  11. Right-click ExecutionResultProcessingTimeout, point to Script Job as, point to CREATE To, and then select File.

  12. In the Select a file dialog box, select a folder on the local computer to store the SQL Server scripts, and then select Save.

  13. Right-click TEEDB_Cleanup, point to Script Job as, point to CREATE To, and then select File.

  14. In the Select a file dialog box, select a folder on the local computer to store the SQL Server scripts, and then select Save.

  15. Copy the four *.bak files and the two *.sql files onto the new SQL Server computer.