November 20, 2014 at 4:07 pm
Comments posted to this topic are about the item Ping Linked Servers From Agent Job
December 12, 2014 at 6:04 am
Hi,
I would add [] in the linkedServer name, because if not, when you have a server with this name "SERVER\INSTANCE" it will give you and error because of the '\' in the name.
SELECT @STR = N'EXEC(''SELECT @@SERVERNAME'') AT ' + [highlight=#ffff11]'['[/highlight]+@LinkedServer+[highlight=#ffff11]']'[/highlight]
December 12, 2014 at 8:28 am
Am I missing something? Besides the comment to add brackets to protect against special characters in the server name/instance, why is everyone giving this such a low rating? Unless the solution is downright detrimental to the server or database, I think 1 star is a little drastic...
December 12, 2014 at 8:44 am
I did not even notice the star rating until you pointed it out. This is my first submission and certainly did not submit for a super rating, just to get my feet wet sharing. We actually use Nagios for our server alerts, but the software is hosted at our datacenter and wanted a redundant ping out on AWS.
Anyway, is there a way I can edit the script with the suggested update, or would that have to be a new "v2" submission later on?
December 1, 2015 at 12:57 pm
This script sends multiple email alerts rather than a single email. Can this be fixed?
December 2, 2015 at 9:30 am
This could be accomplished by logging error output to a new table and adding logic to not send new emails for x number of hours from last notification. I personally do not want to add a new table for this feature.
I only add production linked servers to the ping and if they are down, I don't mind seeing a mass of email as it is a critical issue for me. If you are doing maintenance you can disable the job temporarily to not see the alerts.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply