Attaching a Subscription Database

SQL Replication

Replication

Attaching a Subscription Database

After copying the subscription database and saving it as an .msf file, you can transfer and attach it to any Subscriber. When you attach it to the new Subscriber, the file is decompressed and then attached. You must have database owner permissions to attach a subscription database to a new Subscriber.

Merge replication .msf files are valid only for the retention period set for those publications, and transactional replication .msf files are valid only for the maximum retention period of the distribution database. If a subscription expires, new snapshot files must be generated and the subscription reinitialized.

If the subscription database has subscriptions to publications that allow queued updating with auto identity range articles, you will need to run the distribution agents to obtain new identity ranges on the Subscriber after attaching the subscription database. If the subscription database has subscriptions to merge publications, you will need to run the merge agents on the Subscriber after attaching the subscription database to prevent conflicts.

Note  Detaching a database created with SQL Server 7.0 with subscriptions to transactional replication and attaching it on a server running SQL Server 2000 is not recommended. If this is required, run sp_vupgrade_subscription_databases, a system stored procedure in the master database, to upgrade the replication schema after attaching the database.

The procedures for attaching a subscription database are different depending on whether you are using anonymous or named subscriptions.