If a database falls out of sync, you can mark it as needing recovery. You can then
resynchronize the marked database while not affecting other databases in the replication set. The
marked database goes offline, but the data in the in-sync databases continues to be replicated and
replayed on each replica.
About this task
The following steps provide a general overview of the process.
For a complete explanation and
example, see nzreplanalyze command.
Procedure
- Manually mark the database as needing recovery by issuing
the following command:
ALTER DATABASE <db> REPLICATION NEEDS RECOVERY FOR <subordinate>
- Using the nzreplanalyze -needsrecovery command with, as appropriate, the
-sub and -db options, further refine
the list of databases to
resynchronize:
nzreplanalyze -recoveryfile <fileName> -set repslet
-needsrecovery -sub <subordinateName>
- Back up the databases by issuing the nzreplbackup command, using the
recovery file that the nzreplanalyze command generated and the appropriate
transfer option, such as -dir or -pts:
nzreplbackup -recoveryfile <fileName> <transferOption>
- Restore the databases on the replica
by issuing the nzreplrestore
command:
nzreplrestore -recoveryfile <filePathAndName>
- If necessary, reactivate the nodes by issuing
the following command:
ALTER REPLICATION NODE repslet.<subordinateName> STATE ACTIVE