June 24, 2009 at 3:49 am
this is really a tough job to keep wathcing the replication and sometimes it get failed in that case there must be something or schedule process by which it will automatically restart?
Any help related to the same highly appreciated.
June 24, 2009 at 4:02 pm
There's not a lot of detail in your problem description, but you should probably look at configuring some replication alerts to notify you whenever a failure occurs.
The following links might be of some help.
http://msdn.microsoft.com/en-us/library/ms152496(SQL.90).aspx
http://msdn.microsoft.com/en-us/library/ms151320(SQL.90).aspx
I've fixed many replication issues simple by restarting the failed scheduled jobs, but sometimes you have to fix whatever the underlying cause of the failure is.
June 24, 2009 at 9:49 pm
First you need to find the root cause why the replication got failed..
Most of the problems will be solved by restarting the replication agents...like network issues etc...
You need to find which replication agent got failed.
then go the agent history and find the error message or you can find in sql server error logs etc...
then trouble shoot as per that...
Rajesh Kasturi
June 25, 2009 at 9:04 am
There are many scenarios where a distribution agent can fail and how you handle it depends on the severity of the failure.
- If it's a failure because a row is missing at the subscriber you need to dig into the history to find the cause of the failure. Once you correct it you can restart the agent
- If it's a failure because of network connectivity you may just need to restart the agent once the network connection between your distributor and subscriber is back
- If it's a failure because the subscription has fallen out of sync it's more severe and you will likely need to resynchronize in order to get back on track
While continuously running distribution agents are recommended, you can consider scheduling the agents to run every minute which will ensure that if one fails it will restart within a minute. That doesn't fix the 1st or 3rd scenario I gave above though.
I suggest you look into configuring replication alerts so that you get an email or similar notification when an agent fails. That will save you from having to keep replication monitor up all the time and will also let you know in off-hours when you have a problem that you need to look into.
Of course there's also the scenario where continuously running agents are stopped manually and then someone forgets to restart them. To handle this case I have an agent job that runs on my distributors every hour that restarts agents which are scheduled to run at startup (i.e. continuously) but are not currently running.
June 25, 2009 at 11:54 pm
This is really very good to see all of your views and that is correct by identifying the failure reason we can restart the replication agent. I would love to have some solution or services which can restart the replication agent automatically by viewing the replication error code without manual intervention.
Or simply we can say that as and when replication gets failed some automated service get activated and restart the replication agent and even after that if the replication does not start then it will send an email to the adminsitrator.
Thanks a lot for all.
June 26, 2009 at 8:23 am
rupesh.net (6/25/2009)
This is really very good to see all of your views and that is correct by identifying the failure reason we can restart the replication agent. I would love to have some solution or services which can restart the replication agent automatically by viewing the replication error code without manual intervention.Or simply we can say that as and when replication gets failed some automated service get activated and restart the replication agent and even after that if the replication does not start then it will send an email to the adminsitrator.
You can accomplish almost all of this with a combination of approaches. First, implement alerts for failed agents so you get your email when it happens. Second, add a job which restarts non-running agents that should be running continuously (LMK if you're interested in sample code to do that). Third, while possible but I don't necessarily recommend because it can lead to loss of data integrity at subscribers, you can set the distribution agent profile to skip data consistency errors.
July 3, 2009 at 12:43 am
Kendal, Thanks a lot for your views.
In order to your comments I have already implemented the alerts and used to get once the replication get failed. But could you just put some light on how to identified in a scheduled job that the replication agent get failed. Your help is highly appreciated.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply