One of the tasks you have to provide for in an environment intended for long-term use is cleanup. An architecture that does not perform system cleanup and handle as much of its own system maintenance as possible can present administration headaches down the road. When replication is first enabled, SQL Server creates five canned SQL Server Agent jobs to help keep replication humming along and to aid it in cleaning up after itself. Table 21.2 summarizes these jobs.
Each of these maintenance tasks helps replication continue to run well over the long-term and reduces the administrative burden on those managing the replication installation. For example, the distribution cleanup job deletes the files associated with a snapshot once the snapshot has been applied to all subscribers. Of course, if a snapshot publication supports anonymous subscribers or was defined with the option to create the first snapshot immediately, at least one copy of the snapshot files must be retained.
Job | Purpose |
---|---|
Agent history cleanup | Ages and clears out replication agent history from the distribution database |
Distribution cleanup | Clears replicated transactions from the distribution database |
Expired subscription cleanup | Detects and deletes expired subscriptions from published databases |
Reinitialize subscriptions having data validation failures | Reinitializes all subscriptions that experienced data validation failures |
Replication agents checkup | Detects replication agents that have “gone silent” (that are not actively logging history) |
3.147.76.89