Rolling Back a Replicated Database
A rollback is a procedure that reverts a target database to a previous known good snapshot.
The most common use case for rolling back a database is as part of a failover
procedure when database replication is in use. A rollback of this kind occurs
automatically as part of an ALTER DATABASE...ALTER
REPLICA...PROMOTE
command, as explained in Replication Failover and Failback.
You can roll back a target database that is being used for replication manually if
you have taken a target database out of HOT_STANDBY
mode for some
reason, such as to run some tests that require writes. After you have run these
tests, the target database and source database will be out of sync, and you will not
be able to resume replication. Resuming replication in this case requires you to
roll back the database to a known good snapshot (a backup snapshot created by the
replication process). Rolling back a database also puts the database back into
HOT_STANDBY
mode, which is required before replication can
resume.
See also ROLLBACK DATABASE.
The following procedure contains the steps for rolling back a replicated
database by using an explicit ROLLBACK DATABASE
command: