Search code examples
sql-serversql-server-2005merge-replication

SQL Server 2005 Merge Replication: Under what circumstances would the base snapshot expire?


Obviously changing schema, adding / removing published articles etc expires the snapshot, but is there anything else that would cause the publication to expire?

We're seeing a snapshot expiring without any changes to schema or data on the server.

If a snapshot is older than the subscription expiration, would that cause it to be expired?


Solution

  • To answer my own question:

    The snapshot expires when:

    • Any schema change or any change to the publication properties
    • When the snapshot is older than the subscription expiration

    NB: When you create the publication, sql creates a sql agent job that runs every 14 days (the default subscription expiration period). If you subsequently change the expiration period (e.g. to 7 days), the schedule of this job is not updated, and needs to be manually done, otherwise you risk getting snapshot obsolete errors.