Use this procedure only if you have coordinated dumps of both primary and replicate databases. To load a primary database and all replicate databases to the same state, follow this procedure:
Perform steps 1 through 10 from “Loading a primary database from dumps”.
Suspend connections to the replicate databases that must be restored.
For each replicate database, log in to its managing Replication Server and execute the suspend connection command:
suspend connection to data_server.database
Load the replicate databases from the coordinated dumps that correspond to the restored primary database state.
For each replicate database, log in to its managing Replication Server and execute a sysadmin set_dsi_generation command to set the generation number for the database to the same generation number used in step 1:
sysadmin set_dsi_generation, 101, primary_data_server, primary_database, replicate_data_server, replicate_database
The parameters primary_data_server and primary_database specify the primary database for loading. The parameters replicate_data_server and replicate_database specify the replicate database for loading.
Setting the generation numbers in this manner prevents Replication Servers from applying to the replicate databases any old messages that may be in the queues.
For each replicate database, log in to its managing Replication Server and execute the resume connection command to restart the DSI for the database:
resume connection to data_server.database
Restart the primary Replication Server in normal mode.
Restart RepAgent for the primary database in normal mode.
If any subscriptions were materializing when the failure occurred, drop them and re-create them.