Migrating Data to a New Microsoft SQL Server

To migrate your ActivID CMS data to a new Microsoft SQL Server, complete the following steps.

  1. Stop the ActivID CMS server.

  2. On the source system where the older Microsoft SQL Server is installed, open Microsoft SQL Server Management Studio to open the new Microsoft SQL Server database.

  3. Click to expand the Server node to reveal all databases (as illustrated next).

    Microsoft SQL Server Management Studio with AIMSAUDIT selected and Detach selected in the Tasks menu

  4. Right-click the AIMSAUDIT database, click Tasks, and then click Detach to display the Detach Database window.

    Detach Database window of Microsoft SQL Server Management Studio with Drop Connections option selected and outlined in red

  5. Check the Drop Connections check box and click OK.

  6. Repeat steps 4 and 5 to detach each of your remaining ActivID CMS databases (AIMSCTI, AIMSEE, AIMSLGI, AIMSRQI, and AIMSUSER).

  7. On the source system where the older Microsoft SQL Server is installed, go to:

    C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data

  8. Copy all of the .mdf and .ldf files in your source ActivID CMS databases. For example, the files:

    AIMSAUDIT.mdf, AIMSAUDIT_log.ldf or AIMSCTI.mdf

  9. On the destination system where the new Microsoft SQL Server is installed, go to:

    C:\ Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA

  10. Paste all of the .mdf and .ldf files that you previously copied in step 8.

  11. On the destination system where the new Microsoft SQL Server is installed, open Microsoft SQL Server Management Studio to open the new Microsoft SQL Server databases.

    Microsoft SQL Server Management Studio with Databases node selected in the left panel and Attach selected in the pop-up menu

  12. Right-click the Databases node, and then click Attach to display the Attach Databases window.

    Attach Databases window of Microsoft SQL Server Management Studio with Add button outlined in red

  13. Click Add to display the Locate Databases window.

  14. Expand the nodes as needed to locate the Data subdirectory. For example, the directory might be:

    C:\Program Files\Microsoft SQL Server\ MSSQL10.MSSQLSERVER\MSSQL\DATA

  15. Expand the Data subdirectory where the .mdf files of the ActivID CMS databases are located.

    Locate Database Files window with DATA subdirectory of Microsoft SQL Server node expanded and AIMSAUDI.mdf file selected

  16. Select AIMSAUDIT.mdf and then click OK to attach this database to the new Microsoft SQL Server.

    Attach Databases window of Microsoft SQL Server Management Studio with AIMSAUDIT listed in the Databases to attach section

  17. Click OK.

    Microsoft SQL Server Management Studio message box asking if you have added all necessary catalogs

  18. Click OK to the confirmation message to attach the database to the new Microsoft SQL Server.

  19. Repeat step 11 through step 18 for the five remaining ActivID CMS databases (AIMSCTI, AIMSEE, AIMSLGI, AIMSRQI and AIMSUSER).

    The following image illustrates all ActivID CMS databases attached to the new Microsoft SQL Server.

    Microsoft SQL Server Management Studio with Databases node expanded in the left panel including the list of CMS databases

  20. Create a login for each of the ActivID CMS databases by completing the following steps.

    • Select the AIMSAUDIT database, and then click New Query to display the New Query window.

    The following list contains the guidelines you must observe when using database logins.

    • Each of the six ActivID CMS databases must be linked to a login that is composed of a Database Owner username and password.

    • The username is always the name of the database (for example, for the AIMSAUDIT database, the username is AIMSAUDIT).

    • The password is the Database Owner password that was created during the ActivID CMS installation. 

  21. In the New Query window, enter the following query:

    Copy
    exec sp_change_users_login ‘Auto_Fix’, ‘AIMSAUDIT’, NULL, ‘your_db_password’;

    This query creates a database login with the username AIMSAUDIT and the password <your_db_password>, and linked to the database.

    Note: <your_db_password> must match the Database Owner password that was defined when ActivID CMS was installed. If you use a different password, you must also change the Database Owner password that was defined during your ActivID CMS installation.
  22. Click Execute. This displays the Query executed successfully message shown in the following illustration.

    Microsoft SQL Server Management Studio window with AIMSAUDIT Login outlined in red and with the Query executed successfully message outlined in red

    You can expand the Security node to verify that the AIMSAUDIT database login has been successfully created under Logins (illustrated above).

  23. To verify the state of the login configuration, under Logins, right-click AIMSAUDIT, and then click Properties.

    Login Properties - AIMSAUDIT window with User Mapping selected in the left panel and related information displayed in the right panel

  24. Repeat steps 20 through step 23 for the five remaining ActivID CMS databases (using the corresponding database names).

    When you have run all queries, all ActivID CMS logins should be displayed under Logins as illustrated next.

    Microsoft SQL Server Management Studio window with Security node expanded to display ActivID CMS logins which are outlined in red

  25. Recreate the AIMSEE user in the AIMSLGI database and map the AIMSEE login to the AIMSLGI_ACCESS role by completing the following steps.

    • On the destination system where new Microsoft SQL Server is installed, open the SQL Server Management Studio and click New Query.

    • Execute the following script as shown in the below screenshot.

      Copy
      USE [AIMSLGI
      GO
      DROP SCHEMA [AIMSEE]
      GO
      USE [AIMSLGI]
      GO
      DROP USER [AIMSEE]
      GO
      USE [AIMSLGI]
      GO
      CREATE USER [AIMSEE] FOR LOGIN [AIMSEE]
      GO
      USE [AIMSLGI]
      GO
      ALTER USER [AIMSEE] WITH DEFAULT_SCHEMA=[AIMSEE]
      GO
      USE [AIMSLGI]
      GO
      EXEC sp_addrolemember N'AIMSLGI_ACCESS', N'AIMSEE'
      GO

      Microsoft SQL Server Management Studio window displaying Command(s) completed successfully and Query executed successfully messages outlined in red