Search code examples
sql-servertransactional-replication

Sql Server subscription agent in running state


We have a snapshot replication setup with push subscription. Now we have setup a second subscriber. We followed below steps: a) Run snapshot agent - completed. b) Run the old distribution agent - completed. c) Run the new distribution agent to another database - running. The snapshot agent for this new subscription is still in running state. More details in replication shows the message "Delivered snapshot from unc/...' , 'No more replicated transactions are available'. Checked the new secondary database the data is getting replicated. Now why the agent status is still in running state ? Do we continue to wait for it to complete, because its been over 4 hrs the state has not changed also no new message in the replication monitor.

Server configuration: Publisher -- Sql server 2008 R2 ; Old subscriber = sql server 2005 ; new subscriber = sql server 2012


Solution

  • The issue was with one extra parameter in the distributor job agent '-Continuous'. This was causing the distributor agent to remain alive even after finishing the replication job. On removing this parameter the job agent would finish replication and end instead of continuous polling.