Starting replication to the new primary server after a failover
If the current primary server in your DB2® HADR configuration fails and the database workload is transferred to the standby server, you must complete several tasks before the product will resume replication to the new primary server.
If the primary and standby servers in your DB2 HADR configuration use the same IP address or hostname, you can fully automate this process with a script.
You must complete the following tasks after a primary server
failure:
- Stop replication on all subscriptions with the dmendreplication command.
- Shut down all CDC Replication processes with the dmshutdown command.
- Delete the following staging area files in the CDC Replication installation
directory:
- <instance_name>/conf/txq*
- <instance_name>/stagingstore/*
- <instance_name>/tmp/*
- Restart your CDC Replication instance on the new primary server with the dmts32 or dmts64 commands.
- If the IP address or hostname of your primary and standby servers are different, you must specify the IP address or hostname of the new primary server after each failover event by changing the target datastore for all subscriptions in Management Console.
- Start replication to the new primary server with the dmstartmirror command.