Need to restart OE Replication?
More often than not, replication gets hung up due to a communication glitch in the network between the replication server running on the source database and the agent(s) running on the target database(s).
If that is the case, the simplest and quickest way to get replication up and running again is first to restart the replication agent(s), followed by restarting the replication server.
The Progress commands look like this (run with the ID that owns the database files):
rfutil <target database> -C restart agent
(repeat for the second target if available)
rfutil <source database> -C restart server
Once you have restarted the agents and server, check the status of each with the following:
dsrutil <database> -C status -verbose
You want to see the following:
Source:
6021: Normal Processing
Target:
3049: Normal Processing
Depending on how long replication communications have been down, once communications have been re-established, it may take a while for the target(s) to synchronize with the source database. In that case, the status reported above may be "Startup Synchronization."
You can expect the source and target(s) to remain in this mode until all of your locked AI extents have been replicated to the target(s).
To see how many locked extents you have, run the following:
proutil <source database> -C aimage list
Look for "locked" AI extents. The speed at which the number of locked ai extents decreases should give you an idea of how long the sync will take.
Restarting OE Replication on Windows
NOTE: This avoids the situation where you must keep a command window open to prevent the service from being killed when the user who started it logs out.
It spits out some warnings/errors, which can usually be ignored. The restart does get executed.
To set this up:
To test this in a DEV/TEST environment to verify it is working as expected:
dsrutil <target dbname> -C status -verbose
dsrutil <target dbname> -C terminate agent
dsrutil <source dbname> -C status -verbose
7. To fake a comms glitch run:
dsrutil <source dbname> -C terminate agent
On to production ...
Deploy the new scripts to your production source, target db servers, and edit the DB names accordingly. Plan some time to test this in your production environment before you must rely on it!
dsrutil < [ source | target ] dbname> -C terminate [ server | agent ]
proutil <source db name> -C aimage list
Other resources
Progress article on How to restart the Replication Server under the Local System Account.