To test the replication setup, you require a test satellite. The test satellite must be known to the DB2 control server. For more information, see Creating Test Satellites. For information about creating and setting up a satellite so that you can use it to test batches, see Installing and Preparing a Satellite for Synchronization. Remember to run a synchronization test from the satellite to verify that the correct configuration exists both at the DB2 control server, and at the satellite. Use the db2sync -t command to perform the synchronization test. The sections that follow describe additional considerations and steps that you need to perform.
If you did not create a database during installation and specify that the database would be used as a replication source, or that the database would be recoverable, you must now set the value for the logretain database configuration parameter:
When logretain is set to Capture, the Capture program automatically calls the prune logfile command when it completes its cycle. For more information, see Logging and DB2 Data Replication.
Notes:
During the Apply program cycle, the Apply program checks whether any replication subscriptions are due for replication. If changed data exists, the Apply program applies the data to the appropriate targets. During the process, different control tables are updated so that the Capture and Apply programs can identify what data was replicated, when this data was replicated, and which tables were updated.
The first time that the test satellite synchronizes, it downloads the batch steps that contain the appropriate SQL statements and commands to set up replication on the satellite.
The asnsat command is invoked by one of the batch steps of the update batch during synchronization. The asnsat command automatically starts the Capture and Apply programs with the optimal parameters for the satellite environment. The asnsat command bypasses the Capture program or the Apply program, as necessary. The Capture and Apply programs self-terminate after each has completed a cycle.
Note: | If the asnsat command must access a DB2 database that is remote to the satellite for replication, ensure that the authentication credentials that you create for the replication batch step has adequate privileges on the tables at the remote database. If the asnsat command only executes against the database on the satellite, the asnsat command executes with SYSADM authority when it is started as part of a synchronization session. |
After the test satellite synchronizes, examine the results of the data replication. See Checking the Results of the Synchronization Session for additional information. In addition, you should verify that the data that was replicated to the test satellite is the correct subset of the corporate data that this satellite should receive. You can perform this task by issuing SQL queries against the data. You can also use the end-user application to verify the data.
If errors occurred, correct them, and synchronize again. When you are satisfied with the results on the test satellite, you should have the model office synchronize to replicate data. Because the model office represents and is configured as you intend to configure your production satellites, this final test will help validate the behavior of the replication setup in the production environment.
[ Top of Page ]