1.Snapshot Agent Job Failed

Reason: Access denied to the snapshot folder

Solution: Provide full  permissions to the user on snapshot folder

                           (or)

Change the snapshot folder path

2. Log reader agent job failed

Error: ‘The process could not execute ‘sp_replcmds’ on servername‘.

Cause:

To facilitate transactional replication, Log Reader Agent moves the transactions that are marked for replication from the transaction log on the publisher to the distribution database. You may receive this error message when Log Reader Agent cannot move the transaction log within the time limit that you set in the Log Reader Agent QueryTimeout property.

WORKAROUND

To work around this problem:

  1. Create a new Log Reader Agent profile or modify the existing Log Reader Agent profile.
  2. Set the value of QueryTimeout property to 0 for the Log Reader Agent profile.

    -or-

    Increase the value of QueryTimeout property and decrease the value of ReadBatchSize property of the Log Reader Agent profile so that the processing of the transaction log is successful.

  3. Set the Log Reader Agent profile in that is referred to in step 2 as the default profile for Log Reader Agent.

Warning If you decrease the value of the Log Reader Agent ReadBatchSize property, Log Reader Agent may take longer to process the transaction log. Therefore, run enough tests before you set the value of the ReadBatchSize and QueryTimeout properties to make sure that the Log Reader Agent performance has not degraded significantly.

steps to do :

To do this from Replication Monitor (right-click the “Replication” node in Management Studio, and choose Launch Replication Monitor).

Select your publication, right click the subscription in the list to the right, and choose “Agent Profile”. You can either edit the “Default agent profile” or create a new one. Either way, you can modify the -QueryTimeout parameter if you click the little ellipsis button to edit the profile.

 

Final solution: (If all work arounds doent work for you then follow beloe steps)

Symptom:
1.      sp_replcmds cant be executed during Log Agent run.
2.      No matter what you do even with double coffee cup, it doesnt fix a thing.

Problem:
metadata for replication got corrupted.

Fix:
1.      Delete all subscriptions
2.      Delete all publications
3.      Disable publisher replication
4.      Disable distributor replication
5.      Enable Distributor replication
6.      Enable Publisher replication
7.      Create each publication and let each snapshot finish.
8.      Create subscriptions
9.      Verify Snapshot Agent status on each publication
10.      Verify Log Agent status on each publication
11.      Verify Synchronization status on each subscription
12.      Verify data on replicated table publisher and subscriber matched.
13.      Once everything is verified, its confirmed its done.

 

 

Advertisements