Before you restore schemas that contain replicated tables with row modification tracking,
you must set a unique replication identifier at the source and target databases.
Before you begin
- Follow these steps on both the source and target systems.
- Run all commands while logged in as
dsadm
.
About this task
Row modification tracking allows you to continue DML operations on Db2®
column-organized tables during a schema backup and restore operation. To enable the feature,
Db2 adds
three system-maintained hidden columns to the tables, including SYSROWID, a unique row identifier
for the table.
Replication must ensure that the identity sequence of the SYSROWID column on each replication
site generates completely different and non-overlapping values so that SYSROWID column values remain
unique even after switching workloads from one site to another. To enable this, you set a unique
REPL_SITE_ID at the source and target databases.
Procedure
-
Disconnect all applications from the database and verify that all connections are closed:
db2 terminate
db2 force application all
db2 list applications
-
Deactivate the database:
-
Set a unique replication site ID between 1 and 63.
db2 update db cfg for BLUDB using REPL_SITE_ID n IMMEDIATE
Note: You must ensure that the value of REPL_SITE_ID is unique across all replication sites to avoid
duplicate values in the SYSROWID column that could lead to unresolvable conflicts and errors. For
partitioned databases, all partitions in the same database should share the same
REPL_SITE_ID.
-
Activate the database:
-
Check that REPL_SITE_ID is set for all database partitions:
db2 connect to bludb;
db2 "SELECT NAME, SUBSTR(VALUE,1,5) AS VALUE, DBPARTITIONNUM FROM SYSIBMADM.DBCFG WHERE NAME = 'repl_site_id' ORDER BY DBPARTITIONNUM WITH UR"
-
Enable Wolverine:
wvcli system enable -m enable
-
Outside of Docker, start the web console:
ap apps enable WebConsole
Check the status of the console:
ap apps
-
The web console server and the replication web server are started by Wolverine automatically.
Check the status of these servers:
/opt/ibm/dsserver/bin/status.sh
/opt/ibm/bludr/scripts/bin/bludr-status.sh
If you are running Db2 and do not
have access to Wolverine, the web console server, or the Replication REST server, run the following
commands:
/opt/ibm/dsserver/bin/start.sh
/opt/ibm/bludr/scripts/bin/bludr-start.sh