- Replication Stored Procedures
- Modifying Published Table Schemas
- Adding and Removing Articles from Publications
- Subscription Expiration and Deactivation
- Summary
Subscription Expiration and Deactivation
Subscription expiration and deactivation work the same way as they did in previous releases. (If you need a refresher on these concepts, please see my previous article, Setting Up Transactional Replication with SQL Server 2005)
You can configure a publication to never expire subscriptions; in this case, subscriptions are never dropped, but they can be deactivated. Alternatively, you can advise SQL Server to expire and drop subscriptions if they’re not synchronized within a specified time interval (between 1 and 336 hours). Subscription expiration and deactivation can be configured on the general page of Publication Properties dialog box shown in the following figure.
Subscription expiration and deactivation is managed by the expired subscription clean up job created when you configure replication (by default, this job runs once per day). Note that the distribution clean up job also checks whether any subscriptions need to be deactivated or dropped. The main purpose of the distribution clean up job is to remove delivered commands from the distribution database (by default, this job runs every 10 minutes).
If subscriptions expire, they can be reinitialized by right-clicking the subscription and choosing to reinitialize. When you reinitialize subscriptions, SQL Server generates a fresh snapshot and applies it to the subscription database(s).