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.
Return Code Values
0 (success) or 1 (failure)
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.
Only members of the sysadmin fixed server role or db_owner fixed database role can execute sp_expired_subscription_cleanup.