How many jobs get created during Distribution Database setup – This is most common question which you are asked in interview or you asked yourself during the setup of Distribution Database for replication.
I am using SQL Server 2014 Enterprise version to setup Distribution Database. Let’s start the setup;
- Before you setup the Distribution Database, let’s verify what all the jobs are running on a new SQL Server instance. Basically, there is no job which is running other than one default job called ‘syspolicy_purge_history’ which is being used by Policy Management.
- Distribution database has been configured on the server. Now, let’s see how many jobs got created.
So, here the conclusion, When you setup Distribution database on the server, it creates total 6 jobs. Below is the details of those jobs;
- Agent history clean up: distribution – It deletes all the history records from the distribution database but before deleting the history records, It has to check distribution database history retention setting to determine whether the records needs to be delete or not.
- Distribution Cleanup up: distribution – It removes replicated transaction from Distribution database by making sure that each transaction has been replicated from Distribution database to Subscriber database successfully.
- Expired subscription clean up – It detects and removes expired subscriptions, were failed to connect to the subscriber server within Publication retention period, from Publication database.
- Reinitialize subscriptions having data validation failures – It identifies all subscriptions that have data validation error and marks them for re-initialization. Data validation can be used to verify the data consistency between Publisher and Subscriber.
- Replication agents checkup – It detects replication agents that are not actively logging history. It writes to the Microsoft Windows event log if a job step fails to reports it status in the Distribution database.
- Replication monitoring refresher for distribution – It is used to refresh the cached queries used by Replication Monitor.