Checking remote server status

  • I have a stored procedure that checks the status of several remote sql servers (mixture 7/2000) It runs:

    select program_name from serevr_name.master.dbo.sysprocesses where program_name like 'SQLAgent%'

    simply to see if the agent service is running. The problem is that if the actual sql server service itself is stopped the SP crashes out with "SQL Server does not exist or access denied." messages.

    I can't seem to find any way to trap these messages as the usual @@error doesn't trap it.

    Or is there another way to automatically check the status of remote servers?

    Thanks

  • If you create a master server, with all your other servers as target servers, then SQL automatically control the status of the SQL Agent, and you could read remotely the Agent error log.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply