Synchronizing v23 Databases with v24 Results Database

Topic Contents [Hide]Topic Contents [Show]
  1. Configure the Results Database Connection
  2. Export Nominal Data to the Results Database
  3. Results Services Process the Export Jobs
  4. Run the Synchronization on Upgraded CM4D DBs

After upgrading your CM4D installation to v24, you need to synchronize your CM4D databases with the new Results database. This process is absolutely essential to ensuring that your data is present and accurate before you start using v24.

Why Do I Have to Synchronize Databases?

Version 24 introduces a new database type into the CM4D system structure. The Results database is the data warehouse that depends on the CM4D databases to feed it data from all of the CM4D applications so it can generate results. Once the new database is connected to the CM4D system, it will begin receiving information. If you start processing data for a Routine that does not exist in the Results database, you may end up with orphan or faulty information in the Results database. For the best outcome, you need a healthy starting point where the required data is passed from CM4D into the Results database before anything else is done in v24.

Can I Synchronize Databases Later?

No. All upgraded CM4D databases must be synchronized with the new Results database. If you do not complete this process, you will have issues with the data in your Results database, such as new Samples added to the Results may not have any nominal data. The best outcome is exporting all nominal data from your upgraded CM4D databases before doing anything else in v24.

While the export is in process, you will not have access to the database.

What if I Do Not Want Results?

CM4D v24 is designed to pass messages/data to the Results database. If a Results database is not available, CM4D will detect this and treat it as an error condition. At a minimum, you must have a database object and configure the options in CM4D. If you never use the Results, it will remain as a background object. However, you will miss out on the benefits of having a high-performance repository of information available for business analysis. In future versions of the product, the Results data will become a key part of the development path.

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. 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.

Can I use ONLY the Results Database?

No. The CM4D databases are still required, for some of the following reasons.

Configure the Results Database Connection

The Results database connection information is entered in SiteManager and stored in the CM4D Site database. It is used by DbMigrator and the Results Loader service to access the Results Database.

For DbMigrator, the user set in SiteManager is used to not only update the Results database but in some cases (such as first install) actually create the database object. Due to this, the user entered must have a sufficient privilege level. If you do not want to have a user with such a privilege set here, there are other options available for running DbMigrator.

Export Nominal Data to the Results Database

Synchronizing your upgraded 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 if you want to generate Processes and Results. 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.ResultExportQueue). Once the Results services are running, the jobs are picked up and processed into the Results database.

Results Services Process the Export Jobs

The Results export jobs are processed (in order of entry) by the Results Service, Results Launcher and Results Loader services. The services running on the same machine as the Site Manager where the Export to Results Database is clicked.

If you have multiple CM4D databases, the export process may take a long time. One way to speed up this process is to use separate clients to export each CM4D database. Each CM4D client has its own Results services so you can use a single client to process a single CM4D database. This way, all the job processing is distributed.

For example, you would run Site Manager on server A, select database 1 and export it to the Results database. Then you would run Site Manager on server B, select database 2 and export it to the Results database. Each server will handle the export processing for its selected database.

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.

Run the Synchronization on Upgraded CM4D DBs

Configure Results Database Connection.

Run Site Manager.

Go to the Results DataSource tab and enter the required information.

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.

Server Name - Enter the name of the database server. If using a named instance include the instance name with the server.

Database Name - Enter the name of the Results Database.

Windows Authentication - Select one of the two available methods of authentication for connecting to the databases:

Windows Authentication - Set the dropdown to 'True'.

SQL Authentication - Set the dropdown to 'False'.

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.

Password - Enter the password for the SQL user.

Confirm Password - Re-enter the SQL user password.

Click Test Connection.

If successful, click OK and continue to the next step.

If the connection fails on an existing Results database, check your settings and then test again.

If the connection fails in a new installation (before Results db is created), this is ok and you can continue to the next step.

Click Save.

Leave Site Manager running.

Create Results Database.

Browse to the CM4D install folder and go to the DbMigrator folder.

Edit the ATS.CM4D.Conestoga.DbMigrator.exe.config file.

Set the following information:

fiscalStartMonth - Set the month of the start of your fiscal year. Enter a value of 1-12. The default setting is "1" (January).

fiscalStartDay - Set the day of the month as the start of your fiscal year. Enter a value of 1-31. The default setting is "1" (first day of the month). Must be a valid day for the set month.

Run ATS.CM4D.Conestoga.DbMigrator.exe.

When prompted, hit Y to continue.

Wait for the process to complete.

When it is finished running, the Command Prompt will read ''Successful migration. Press any key to exit application".

Test Results DataSource connection. This step is CRUCIAL to running other applications or services.

Go back to Site Manager.

Go to the Results Datasource tab.

Click Test Connection.

Click OK to acknowledge the success message.

Click Save.

Export CM4D Databases to Results Database.

Go to the Managed Data Source tab.

Select a database.

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.

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?".

Look at the Export Job Count field, located under the Export to Results Database button. As long as the Results services are running, this Count will begin to decrease as the export jobs are processed. Until this count is zero the synchronization is not complete.

Once the Export Job Count is zero, 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.

Start Results Services. If you did not configure service logon user during the CM4D installation, edit the properties of each service and set the Logon User.

Open Control Panel > Administrative Tools > Services.

Start the following services (in this order):

Results Service

Results Launcher

Results Loader

On new installations, the services may not start. If you are using a service user account that has never been granted the Log On As A Service rights, complete the following steps on one service.

Right-click on the Results Service and select Properties.

Go to the Log On tab.

In the Log on as section, select This account.

Enter the User credentials for the user account that will run the CM4D service.

Click OK.

Click OK on informative message ‘The account … has been granted the Log On As A Service right.’

Start the 2 remaining Results services.

DO NOT start any other CM4D Service until the synchronization is complete.

Go back to the Managed DataSource tab in Site Manager.

Once the Export Queue Count is zero, 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. 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.

Can we improve this topic?