sp_expired_subscription_cleanup

Transact-SQL Reference

Transact-SQL Reference

sp_expired_subscription_cleanup

Periodically checks the status of all the subscriptions of every publication and identifies those that have expired. This stored procedure is executed at the Publisher on any database.

Syntax

sp_expired_subscription_cleanup

Return Code Values

0 (success) or 1 (failure)

Remarks

sp_expired_subscription_cleanup is used in all types of replication.

sp_expired_subscription_cleanup checks the status of all subscriptions every 24 hours. If any of the subscriptions are out-of-date, that is, have lost contact with the Publisher for too long a period, the publication is declared expired and the traces of the subscription are cleaned up at the Publisher.

Permissions

Only members of the sysadmin fixed server role or db_owner fixed database role can execute sp_expired_subscription_cleanup.

See Also

sp_mergesubscription_cleanup

sp_subscription_cleanup

System Stored Procedures