There are five basic strategies for recovering snapshot or transactional replication:
Note As part of any recovery strategy, always keep a current script of your replication settings in a safe location. In the event of catastrophic failure of a server or the need to set up a test environment, you can modify the script by changing a few server name references, and it can be used to help recover your replication settings.
In addition to scripting your current replication settings, you should also script the enabling and disabling of replication. These scripts are part of two recovery strategies for the Publisher or Distributor.
For information about mapping these five recovery strategies to backup strategies, see Matrix of Backup and Restore Strategies for Snapshot or Transactional Replication (by Topology). The number of each recovery strategy corresponds to the numbers in the matrix.
If your Distributor has failed or if you need to recover your entire replication topology, an appropriate strategy for recovering is to use replication scripting to remove and reenable replication. This strategy requires you to:
One advantage of this strategy is that it removes the need to reconfigure each Publisher, Distributor, and Subscriber manually. Another advantage is that the same strategy can be used with merge replication, thereby providing a unified strategy in applications that use all three types of replication. The disadvantage of this strategy is that it takes longer for the publication to flow from Publisher to Subscriber.
If your Publisher has failed and the backup of the publishing database is available, an appropriate strategy for recovering is to restore the publishing database and then reenable replication. This strategy requires you to:
The advantage of this strategy is that only one server must be restored. The disadvantage of this strategy is that is relies heavily on regular backups of the Publisher.
If either your Publisher or Distributor has failed and you have a coordinated backup of the Publisher and Distributor, an appropriate strategy is to restore both the Publisher and Distributor, use data validation to verify the correctness of the data at Subscribers, and reinitialize, if necessary. This strategy requires you to:
The advantage of this strategy is that it restores the Publisher or Distributor without having to reenable replication and without having to regenerate snapshots from Publisher. The disadvantage of this strategy is that it relies on a coordinated backup of the publishing and distribution databases.
If your Subscriber has failed and the backup of the subscribing database is not available, an appropriate strategy for recovering is to drop and re-create the subscription. The strategy requires you to:
One advantage of this strategy is that it can be done easily. Another advantage is that the same strategy can be used with merge replication, thereby providing a unified strategy in applications that use all three types of replication. The disadvantage of this strategy is that it can require processing and network resources in an environment where network connections are slow or processing power limited.
If your Subscriber has failed and there is an available backup of the subscribing database, an appropriate strategy for recovering is to restore the Subscriber and validate the subscription database. The strategy requires:
The advantage of this strategy is that it avoids having to apply an initial snapshot to the Subscriber if data validation succeeds. The disadvantage of this strategy is that if data validation fails, it requires reinitializing the subscribing database with a new snapshot.
How to script a replication topology (Enterprise Manager) | Monitoring Data Validity |