sys.sp_expired_subscription_cleanup

general
#stored-procedure

Description

Checks the status of all the subscriptions of every publication and drops subscriptions that are expired. This stored procedure is executed at the Publisher on any database, or at the Distributor on the distribution database for a non-SQL Server Publisher.

Syntax

sp_expired_subscription_cleanup

Permissions

cleaned up at the Publisher. For more information, see Subscription Expiration and Deactivation. Only members of the fixed server role or fixed database role can execute. sp_mergesubscription_cleanup (Transact-SQL) sp_subscription_cleanup (Transact-SQL) System stored procedures (Transact-SQL)

Remarks

Checks the status of all the subscriptions of every publication and drops subscriptions that are

expired. This stored procedure is executed at the Publisher on any database, or at the

Distributor on the distribution database for a non-SQL Server Publisher.

The name of a non-SQL Server publisher.

, with a default of

shouldn’t specify this parameter for a SQL Server Publisher.

(success) or

is used in all types of replication.

The Expired Subscription Clean Up job runs

to detect and

remove expired subscriptions from publication databases every 24 hours. If any of the

subscriptions are out-of-date, that is, aren’t synchronized with the Publisher within the

retention period, the publication is declared expired, and the traces of the subscription are