How to detect if a Linked Server is Running

  • Hi

    I have a SP, 'MYSP', that includes this line: EXEC sp_catalogs 'MyLinkedServer'. If MyLinkedServer is running, this SP gives me some information about Databases in that server. If MyLinkedServer is not running, SQL Server raises an error, which is fine, but I can't use the @@ERROR to trap the exception and MYSP execution stops.

    Does anybody knows how can I detect if 'MyLinkedServer'  is running before I send any command/sentence/anything to it?  Or how can I trap the error and finish MYSP? 

    Thank you

    Gabriel

  • This was removed by the editor as SPAM

  •  

    Take a look at the SQL2K ressource kit. There used to be an ODBC Ping utility in there (or something similar).

     

    Eric

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

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