StarQuest Technical Documents
Migrating SQDR Plus Subscriptions from a Test
Environment to a Production Environment
Last Update: 07 July 2008
Product: SQDR Plus and SQDR
Version: 3.4x or later
Article ID: SQV00PL004
Abstract
This document provides instructions on how to migrate SQDR Plus incremental
replication subscriptions from a test environment to a production
environment.
Before You Begin
- Install SQDR Plus on the production source database system. For assistance,
follow the instructions in Part One of the SQDR Plus Quick Start Guide, available on the
StarQuest Customer Support
web page.
- On the SQDR client system, install the ODBC drivers needed to connect to
the source and destination databases.
Solution
These instructions use the terms "source" to refer to the system on which
SQDR Plus is installed, "destination" to refer to the target database, and "SQDR
system" to refer to the system on which SQL Server and SQDR reside. Below is an overview of the steps involved, and each step is further described in the sections that follow.
On the Test SQDR system:
Step 1: Prepare incremental replication groups and record SQDR service settings.
Step 2: Perform a back up of the SQDR control database.
Step 3: Record the ODBC data source names.
On the Production SQDR system:
Step 3: Create the ODBC data sources.
Step 4: Install and configure SQDR.
Step 5: Restore the SQDR control database.
Step 6: Create destination database.
Step 7: Verify the properties of the SQDR Sources and
Destinations.
Step 8: Synchronize SQDR Plus subscriptions with the
production source database system.
On the Test SQDR system:
Step 1: Prepare incremental replication groups and record SQDR service settings.
- Launch the Data Replicator Manager.
- Right-click each incremental replication group and select Pause Updates.
- Right-click each incremental replication group a second time and select Properties. Under the Schedule tab, select the On Demand radio button. Click OK to save the group properties.
- Right-click the SQDR service node in the left pane and select Properties. Record all of the settings under each tab.
Step 2: Perform a back up of the SQDR control
database.
- Using the SQL Server Management Studio, perform a full back up of the
Test SQDR control database (typically named ControlDB).
- Locate the back up file (e.g. ControlDB.bak) and copy it to a temporary
folder on the production SQDR system.
Step 3: Record the ODBC data source names.
- Open the Data Replicator Manager.
- Right-click a Source, select Properties, and record the DSN name of the
corresponding ODBC data source. Repeat for all of the Sources and
Destinations.
On the Production SQDR system:
Step 3: Create the ODBC data sources.
The ODBC data sources on the production SQDR system must be created with the
exact same names as those on the Test SQDR system.
- Launch the Windows ODBC Data Source Administrator, which is typically found in
the menu path Settings –>Control Panel –>Administrative Tools –>Data
Sources (ODBC).
- Create one or more data sources that connect to the production source
database. Be sure that the Data Source Name of each matches exactly the name
of the ODBC Source DSN recorded in Step 2.
- Create one or more data sources that connect to the production
destination database. Be sure that the Data Source Name of each matches
exactly the name of the ODBC Destination DSN recorded in Step 2.
Step 4: Install and configure SQDR.
Run the setup.exe program from the SQDR installer image.
- At the end of the installation, with the Run Configuration Wizard option
enabled, click Finish.
- In the first pane of the Configuration Wizard, select the SQL Server
data source that connects to the local SQL Server installation and enter the
user ID required to log in to the SQL Server. Click Next to proceed.
- Select the option 'Create a new control database' and click Next. Select
a name for the control database and leave the schema field blank. The name of the control database for the production environment does not need to match the name of the control database used for the Test SQDR
system.
- Choose whether to start the Data Replicator service automatically when
the computer is started or manually when the service is needed, and the
Windows account under which the Data Replicator service will run.
- Uncheck the options to start the Data Replicator Service and the Data
Replicator Manager after the configuration is complete. Click Finish to save
the Data Replicator configuration.
Step 5: Restore the SQDR control database.
- Launch the SQL Server Management Studio.
- Right-click the new control database and select Tasks –>Restore –>Database.
- Under the General tab, check the 'From device' radio button as the
'Source for restore' and click the ellipses (...) button to the right of the
field to open the Specify Backup dialog.
- In the Specify Backup dialog, select File as the Backup media. Click Add
and navigate to the .bak file that contains the back up of the control
database for the Test SQDR system. Click OK twice to return to the Restore Database dialog.
- On the General tab, check the box under the Restore column for the
backup set and verify that the 'To database' field shows the name of the new
control database that you created for the production environment in Step 4 as you configured SQDR.
- On the left pane, click the Options page.
- Check the box 'Overwrite the existing database' and select the 'Leave
database ready to use...' as the Recovery state.
- Under the 'Restore the database files as' section, select the files to
restore by clicking the ellipses (...) button to the right of the fields.
The first file should be the .mdf file for the new control database (e.g.
ControlDB.MDF), typically located in C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Data. The second file should the .ldf file for the new
control database (e.g. ControlDB_log.LDF), located in the same directory as
the .mdf file.
- Click OK to start the restore process. When complete, verify that the
new control database contains the same tables as the control database on the
Test SQDR system.
Step 6: Create destination database.
- On the destination database server, create a new database that will serve as
the destination. Be sure
to create a database that has the same name as the destination database
accessed by the Test SQDR system.
Step 7: Verify the properties of the SQDR service, sources, and
destinations.
- Launch the Data Replicator Manager. Right-click the service in the left
pane and select Start Service.
- If the license dialog appears, add the license keys that were provided by StarQuest for using the products.
- Right-click the service in the left pane and select Properties. Set the properties under each tab, using the values recorded in Step 1, so that they match the Test system. If any changes were made, right-click the service and select Stop Service. Again, right-click and select Start Service.
- Review the properties for each Source and update the
User ID and Password entries, if needed. Under the Advanced tab, set a Notification Address (even if this value was not set on the Test system).
- Review the properties for each Destination and update the
User ID and Password entries, if needed.
- Right-click the service in the left pane and select Stop Service.
- Close the Data Replicator Manager.
Step 8: Synchronize SQDR Plus subscriptions with the
production source database system.
The synchronization process requires that all of the incremental replication
subscriptions run baseline snapshot replications. We recommend that you perform
the procedures in this step during a time when the source tables are not heavily
used.
- Launch the SQL Server Management Studio, open a New Query window and
execute the following SQL statement against the control database:
update ir_subscription set capture_configured = 0,
updates_enabled = 0,
snapshot_required = 1,
source_event = ' ', -- a single space
flagged_count = 0
- Open the Data Replicator Manager, right-click the service in the
left pane, and select Start Service.
- On each incremental replication group, right-click and select Properties. Under the Advanced tab, check the box marked 'Receive Change Data Notifications from Capture Agent'. Click OK.
- On each incremental replication group, right-click and select Resume Updates.
- On each incremental replication group, right-click and select Run Group.
After the baseline replications complete, the SQDR service will begin polling for source
table changes according to the interval configured in the Group properties. At this point, you may modify the Group schedule properties to run "As Needed", if desired.