Module 2: Setting up Q Replication
In this module, you configure your databases and create the control tables, replication queue maps, and Q subscriptions.
The Q Capture program at the source database and Q Apply
program at the target database use control tables to
store important information such as which tables to capture data from,
which queues to use, and which tables to apply replicated data to.
Creating control tables is also known as creating a schema.
Replication queue maps identify the IBM® MQ queues that are used for sending and receiving data.
Q subscriptions identify options such as rows and columns that are replicated or published. The Q subscriptions also identify options for loading target tables.
Learning objectives
After you complete the lessons in this module, you will be able to:- Create the source and target control tables.
- Enable the source database for replication.
- Create a replication queue map.
- Create a Q subscription.
Time required
This module should take approximately 20 minutes to complete.Prerequisites
Verify that the Db2® server is running.- Lesson 2.1: Creating the source and target control tables
In this lesson, you use the Replication Center to create the control tables for the Q Capture and Q Apply programs. - Lesson 2.2: Enabling the source database for replication
In this lesson, you enable the source database for replication by turning on archive logging for the SAMPLE database. - Lesson 2.3: Creating a replication queue map
In this lesson, you create a replication queue map to link the SAMPLE database with the TARGETDB database. - Lesson 2.4: Creating a Q subscription
You create a Q subscription for each table that you want to replicate. In this lesson, you create a Q subscription to map the EMPLOYEE table in the SAMPLE database with a copy called EMPLOYEE at the TARGETDB database.