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:
- Run
asncap capture_server=SAMPLEon the command line. - Run
asnapply apply_qual=DEPTQUAL control_server=COPYDBon 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:
- Expand the SQL Replication folder.
- Expand the Definitions folder.
- Expand the Apply Control Servers folder.
- Expand the COPYDB database.
- Select the Dependent Targets folder, right-click on the TGDEPTCOPY entry and select View Selected Contents.
- Use the Db2® Control Center:
- Expand the databases folder for your Db2 instance.
- Expand the COPYDB database.
- Select the Tables folder.
- 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
| 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 | - |