I am adding a linked server to another SQL server within a stored procedure.
I need to verify the link was made before I start running any more code. How
can I verify that I have connected successfully to the linked server?
Matt,
When you add a linked server, you do not make a connection, but
instead just provide the details needed so a connection can be made to
execute a query that refers to the linked server. Basically there is no
"open a connection for the code that follows" statement in SQL. I'm not
quite sure why you would want to add a linked server within a stored
procedure - do you drop the linked server in that procedure as well, so
that repeated calls to the procedure won't try to create an existing
linked server?
It would help if you could give more information about what you are
trying to accomplish.
Steve Kass
Drew University
Matt Tapia wrote:
>I am adding a linked server to another SQL server within a stored procedure.
>I need to verify the link was made before I start running any more code. How
>can I verify that I have connected successfully to the linked server?
>
>
No comments:
Post a Comment