Step 7: Replicate the data for the tutorial scenario

After you register the replication source and create the subscription set, you are ready to replicate the data for this tutorial.

Procedure

To start the Capture and Apply programs, which will perform the initial full refresh for the target table and begin change-capture replication:

  1. Run asncap capture_server=SAMPLE on the command line.
  2. Run asnapply apply_qual=DEPTQUAL control_server=COPYDB on a separate command line.
If you view the TGDEPTCOPY target table after one replication cycle, you should see results that match the data shown in Table 1. You can use any of the following methods to view the contents of the table:
  • Use the Replication Center:
    1. Expand the SQL Replication folder.
    2. Expand the Definitions folder.
    3. Expand the Apply Control Servers folder.
    4. Expand the COPYDB database.
    5. Select the Dependent Targets folder, right-click on the TGDEPTCOPY entry and select View Selected Contents.
  • Use the Db2® Control Center:
    1. Expand the databases folder for your Db2 instance.
    2. Expand the COPYDB database.
    3. Select the Tables folder.
    4. Right-click the TGDEPTCOPY table in the contents pane and select Sample Contents.
  • Use the Db2 Command Center or a Db2 command window to issue the following SQL statement:
    
    SELECT * FROM schema.TGDEPTCOPY
    
Table 1. The TGDEPTCOPY table
DEPTNO DEPTNAME MGRNO ADMRDEPT LOCATION
E01 SUPPORT SERVICES 000050 A00 -
E11 OPERATIONS 000090 E01 -
E21 SOFTWARE SUPPORT 000100 E01 -
F22 BRANCH OFFICE F2   E01 -
G22 BRANCH OFFICE G2   E01 -
H22 BRANCH OFFICE H2   E01 -
I22 BRANCH OFFICE I2   E01 -
J22 BRANCH OFFICE J2   E01 -