You add a replication set to specify a set of tables to be replicated to a designated
target.
Before you begin
- If you plan to specify Replicate create and drop tables for the
replication set, you must manually add the DATA CAPTURE CHANGES attribute to source tables in the
set.
- If you are replicating column-organized tables over an internal LDAP connection, you must add
the dsadm user ID to the bluadmin group. You can use this
command:
cat << EOF > ldap.ldif
dn: cn=bluadmin,ou=Groups,dc=blustratus,dc=com
changetype: modify
add: memberUid
memberUid: dsadm
EOF
source /usr/lib/dashDB_local_common_functions.sh
ldapmodify -D 'cn=bluldap,dc=blustratus,dc=com' -x -Z -H ldap://:389 -f ldap.ldif -w `get_LDAP_root_password`
systemctl stop sssd
rm -f /var/lib/sss/db/*
systemctl start sssd
- If you are replicating column-organized tables over an external LDAP connection, follow these steps:
- Add the dsadm user ID to the
memberUid
attribute of the admin group that is
used for Db2 Warehouse.
- Remove dsadm from the filtered users section in the sssd.conf file, if
present The sssd.conf file is located in/etc/sssd/. There
is a line similar to
filter_users = root, ibmadmin,dsadm
. Remove dsadm from that
line if it is present.
- Run the following command to flush the local sssd
cache:
systemctl stop sssd
rm -f /var/lib/sss/db/*
systemctl start sssd
About this task
Typically your replication set would include tables for which you want to maintain transactional
consistency; for example, all of the tables that are used by an application. For a replication set,
all dependent transactions are applied to the target in the source commit order and other
transactions are applied in parallel.
Restriction: Do not include the same column-organized source table in more than one
replication set. You can put the same row-organized table in multiple sets.
Procedure
-
From the Data Replication screen, click Add Replication Set.
-
Specify the replication target. You can select a target database that is already known to the
replication console or add a new target.
- For an existing target, you only need to test the target connection to ensure that it is
available.
- For a new target, follow these steps:
- Enter the target credentials:
- Host name or IP address
- Port number
- User name and password for connecting
- Click Test connection.
- After confirmation that the database is connected, click Next.
- Confirm your permission to make changes to the target database.
The target database starts to initialize. This process could take several minutes.
-
When the new target is enabled or the connection to the existing target is confirmed, use the
Object Selection screen to select one or more schemas or individual tables to add to the replication
set.
- To select schemas, use the check box to their left. Selecting a schema means selecting all of
the tables within a database schema.
- To select a subset of the tables, click the schema row to view all tables that are part of the
schema and select individual tables from the right-side area. The number of tables that you selected
appears in the upper right corner.
- Optional:
If you want to replicate all CREATE TABLE and DROP TABLE statements within a schema, click
Replicate create and drop tables in the area on the right side.
Any tables that are added to the schema will be automatically recreated at the target and
configured for replication. Any tables that are dropped from the schema will be dropped from the
target.
-
After you add all of your objects, click Next to proceed to the Review
step.
The Review Selections screen shows a summary of the objects that you selected to replicate. You
can add or delete objects from this view. To make changes to the target, click
Previous. When you are satisfied with the review page, click
Next to proceed to the Finalize step.
-
On the Finalize screen:
- Name your replication set. The name appears on the Data Replication page in the table of
replication sets.
- Specify the following options:
- Automatically start the replication set after it is configured
- Specify whether to start replicating data changes at source tables in the replication set to
target tables immediately after the set is configured.
- Load all tables in the replication set when the set is started
- Specify whether you want the replication programs to replace all data in the target tables with
data from the source tables ("load" the target tables) after you start replication.
Note: Do not
choose this option if you want to preserve the data in the target tables, for example if you are
setting up two-way replication for a primary and standby server in a failover/failback
scenario.
-
Click Configure, and on the confirmation window click
OK.
You are taken to the Data Replication screen and your new replication set appears as a row in the
sets table. If you specified automatic start, watch the row for confirmation that replication began.
Otherwise, click the menu on the right side of the row and select the option to start
replication.