Home All Groups Group Topic Archive Search About

Determine which Linked Servers or Remote Servers are being used

Author
27 Dec 2005 7:01 PM
stephendl
Hello,

I did some searching but couldn't find an answer to help me discover
which of the Linked Servers and/or Remote Servers on our instances are
being used.  I wish I could delete them and wait for users to scream,
but that idea got vetoed.  I would think it might be possible to
determine this via Profiler or some other tool.  It would be very
helpful to know specifically which Linked Server or Remote Server was
used by programs, as we have some duplicates pointing to the same
instance.

Ideally I'd like to know also if the Remote Server is being used as a
sender or receiver, as I believe they have to be set up on both
instances to communicate, unlike Linked Servers - but I'm not certain
that is how it works.

I'm using SQL Server 2000, service pack 3.  Thanks for any ideas,
templates, or code you might provide.

Author
27 Dec 2005 10:50 PM
Erland Sommarskog
(stephe***@hotmail.com) writes:
Show quote
> I did some searching but couldn't find an answer to help me discover
> which of the Linked Servers and/or Remote Servers on our instances are
> being used.  I wish I could delete them and wait for users to scream,
> but that idea got vetoed.  I would think it might be possible to
> determine this via Profiler or some other tool.  It would be very
> helpful to know specifically which Linked Server or Remote Server was
> used by programs, as we have some duplicates pointing to the same
> instance.
>
> Ideally I'd like to know also if the Remote Server is being used as a
> sender or receiver, as I believe they have to be set up on both
> instances to communicate, unlike Linked Servers - but I'm not certain
> that is how it works.
>
> I'm using SQL Server 2000, service pack 3.  Thanks for any ideas,
> templates, or code you might provide.

Script out all stored procedures (or search the version-control system
directly) and search for the names of the linked servers. You can also
search in syscomments, but there is the faint possibility that a
server name has been split up over two rows.

Not even that is foolproof, is there invocations that are composed
dynamically, with the server name taken from some configuration table.




--
Erland Sommarskog, SQL Server MVP, esq***@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

AddThis Social Bookmark Button