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