IBM Books

Replication Guide and Reference


Defining a Replication Source

To define a replication source:

  1. Open the Define as Replication Source window:

    1. From the Control Center, expand the object tree under the Systems icon until you see the SAMPLE database.

    2. Click on SAMPLE, then click on the Tables folder. Any existing tables are displayed in the pane on the right side of the Control Center.

    3. Click mouse button 2 on the source table, DEPARTMENT, and select Define as Replication Source - Custom from the pop-up menu.

  2. From the Available columns box, select LOCATION and clear the Define as source check box. This specifies that this column is unavailable as a source column during subscription and cannot be replicated. This action also clears the Capture before image check box.

  3. From the Available columns box, select ADMRDEPT and clear the Capture before image check box. This action prevents before image replication of the source column to the target table.

  4. Click on OK to save the values and close the window. A confirmation window opens.

    1. Select the Save to SQL file and run later radio button and click on OK. The Control Center will generate the necessary SQL.

    2. Type the file name where you want to save the file in the Run SQL files window and click on OK.

    3. Click on OK in the DB2 message window to save the values and close the Define as Replication Source window.

  5. Click mouse button 2 on the Replication Sources folder and select Run SQL files.

  6. Run the SQL file you named above.

  7. Click on OK in the DB2 message window when the message appears that the script file has run successfully.

  8. Click mouse button 1 on the Replication Sources folder. The replication source, DEPARTMENT, appears in the contents pane of the Control Center.

Now the source table DEPARTMENT has been defined as a replication sources table. Additionally, the change data table for DEPARTMENT and all the Capture control tables are created in the default table space for the SAMPLE database. If you want to create the tables in other table spaces, see "Working with Customized Replication Control Tables" and "Customizing and Running Replication SQL Files" for more information.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]