Synchronize CM4D Dbs with Results Db

Topic Contents [Hide]Topic Contents [Show]
  1. Export Nominal Data
  2. Results Services Process the Export Job
  3. Synchronize CM4D Db with the Results Db

Keeping your CM4D databases synchronized with the Results database is critical. When your system is operating normally, this synchronization is done automatically as data is added or changed by CM4D. However, there are some cases where you may need to trigger the synchronize operation manually:

After upgrading a CM4D database from an older version (e.g., v23 to v25).

If your Results database becomes corrupted and you need to recreate the database.

Any other reason you have to create a new Results database.

Do not start this export unless necessary!

Can take a LONG TIME.

Cannot use CM4D Dbs while export is in progress.

Export Nominal Data

Synchronizing your CM4D database(s) involves exporting all Nominal data from the CM4D database(s) to the Results database. The export function in Site Manager will sync all Nominal data. Once the upgrade and export are complete, you must create at least one Results Rule and assign the rule to your Sample data. When Results Rule assignments in DataUtility are committed to the database, those samples will also be sent to the Results database. Results are generated once all data is synced between the two database types (CM4D and Results).

The exported jobs are entered into a queue in the CM4D Site database (dbo.ResultsCommandExportQueue). Once the Results services are running, the jobs are picked up and processed into the Results database.

Even if you do not create Results Rules and generate Results, all Nominal data (Routines and Features) that goes into the CM4D databases will remain synchronized with the Results database (if the Results Datasource is enabled in SiteManager). However, CM4D does not generate Processes and Results for the Results database unless at least one Results Rule is assigned to the appropriate measurement (Sample) data.

Results Services Process the Export Job

The Results export jobs are handled (in order of entry) by the Results Sender and Results Loader services running on the Application Server. If you have multiple CM4D databases, the export process may take a long time. One way to speed up this process is to distribute additional Results transport services on additional machines. See the topic Results Transport for details.

Even with distributing the export processing, expect a significant amount of time needed to complete the synchronization!!

As each database completes synchronization, it will become available for use with other CM4D applications. You may want to begin the synchronization with smaller databases first so you can start to access data as soon as possible.

Synchronize CM4D Db with the Results Db

  1. Configure Results Database Connection.
  2. Run Site Manager.
  3. Go to the Results DataSource tab. The Results database object may not exist at the time of initial configuration if this is a brand new installation (Test Connection will FAIL - this is ok). The information still needs to be entered here since it will be used by DbMigrator to create the database object when the tool is run.
  4. If Enable Results Datasource is not checked, select the box to turn on the Results database.
  5. Enter the required database connection information.
    1. Server Name - Enter the name of the database server. If using a named instance include the instance name with the server.
    2. Database Name - Enter the name of the Results Database.
    3. Windows Authentication - Select one of the two available methods of authentication for connecting to the databases:
      1. Windows Authentication - Set the dropdown to 'True'.
      2. SQL Authentication - Set the dropdown to 'False'.
    4. DataBase UserName - Enter the user name of the SQL user login; must have the 'dbowner' privilege level in SSMS. This is the login used by DbMigrator to create/modify the Results database in SQL Server.
    5. Password - Enter the password for the SQL user.
    6. Confirm Password - Re-enter the SQL user password.
    7. Click Test Connection.
      1. If successful, click OK and continue to the next step.
      2. If the connection fails on an existing Results database, check your settings and then test again.
      3. If the connection fails in a new installation (before Results db is created), this is ok and you can continue to the next step.
    8. Click Save.
  6. Leave Site Manager running.
  7. Create Results Database.
  8. Go to the CM4D install folder (.\CM4D\Database Utilities\Results Database Utility) and run ATS.CM4D.ResultsDatabaseUtility.Migrator.exe.
  9. Follow the prompts in the console window to create or update the Results database.
  10. Once the operation is complete, the command window closes automatically.

If the task you selected did not work, the authentication user may have insufficient database privileges. Check the authentication user credentials or try executing the Database Utility using 'Run as administrator'.

  1. Wait for the process to complete.
  2. When it is finished running, the Command Prompt will read ''Successful migration. Press any key to exit application".
  3. Test Results DataSource connection. This step is CRUCIAL to running other applications or services.
    1. Go back to Site Manager.
    2. Go to the Results Datasource tab.
    3. Click Test Connection.
    4. Click OK to acknowledge the success message.
    5. Click Save.
  4. Export CM4D Databases to Results Database.
    1. Go to the Managed Data Source tab.
    2. Select a database.
    3. Click Export to Results Database. If this button is grayed out (disabled) then there is a problem with your Results database connection. This could be from incorrect connection information, if the Test Connection button was not clicked, or changes were not saved.
    4. Click OK to acknowledge the caution message: "This will export the entire database! This may be a very long operation, and will render the datasource unusable until export is complete. Continue?".
    5. Export all remaining CM4D Databases to the Results database.

You can close Site Manager it and reopen it while the export is still running; the synchronization will not be effected.

  1. Start Results Services. DO NOT start any other CM4D Service until the synchronization is complete.
  2. Go back to the Managed DataSource tab in Site Manager.

If you have multiple Managed DataSources, repeat the 'Export CM4D Databases to Results Database' step and export all remaining CM4D Databases to the Results Database.

Even if you do not create Results Rules and generate Results, all Nominal data (Routines and Features) that goes into the CM4D databases will remain synchronized with the Results database (if the Results Datasource is enabled in SiteManager). However, CM4D does not generate Processes and Results for the Results database unless at least one Results Rule is assigned to the appropriate measurement (Sample) data.

If all databases have completed synchronization, start any other CM4D services as needed.

Can we improve this topic?