When you must recover a primary database by restoring backups, you must also make sure that replicate data in the affected databases at other sites is consistent with the primary data. To provide for consistency after a restore on multiple data servers, Replication Server provides a method for coordinating database dumps and transaction dumps at all sites in a replication system.
You initiate a database dump or transaction dump from the primary database. RepAgent retrieves the dump record from the log and submits it to Replication Server so that the dump request can be distributed to the replicate sites. The method ensures that all of the data can be restored to a known point of consistency.
You can only use a coordinated dump with databases that store either primary data or replicated data but not both. You initiate a coordinated dump from within a primary database.
The process for coordinating dumps works as follows:
In each function-string class assigned to the databases involved, the Replication System Administrator at each site creates function strings for the rs_dumpdb and rs_dumptran system functions. The function strings should call stored procedures that execute the dump database and dump transaction or equivalent commands and update the rs_lastcommit system table. Refer to the Replication Server Reference Manual for examples.
You must be using a function-string class, such as a derived class, in which you can create and modify function strings. See “Managing function-string classes” for more information.
Using the alter connection command, the replication system administrator at each replicate site configures the Replication Servers to enable a coordinated dump.
When a dump is started in a primary database, the RepAgent transfers the dump database or dump transaction log record to the Replication Server.
Replication Server distributes an rs_dumpdb or rs_dumptran function call to sites that have subscriptions for the replicated tables in the database.
The rs_dumpdb and rs_dumptran function strings at the replicate sites execute the customized stored procedures at each replicate site.