SQL Server Admin
T-SQL Articles

June 10, 2009

Viewing Linked Server Information in SQL Server 2005/2008




In one of my previous posts, I demonstrated how to create a Linked Server.

Now during maintenance, if you desire to view the linked servers on your SQL Server instance, use the ‘sys.servers’ system catalog view as shown below:

SELECT name, provider, data_source, connect_timeout, 
query_timeout, is_rpc_out_enabled
FROM sys.servers
WHERE is_linked = 1

OUTPUT


image



As part of the maintenance activities, you can also drop a linked server using the following query:


EXEC sp_dropserver @server= 'SUPROTIM-PC'

To remove related remote and linked server logins for the server, use ‘droplogins’ as the second parameter as shown below:


EXEC sp_dropserver @server= 'SUPROTIM-PC', @droplogins='droplogins'

Note: Use sp_helpserver to show available servers.


Did you like this post?
kick it on DotNetKicks.com
subscribe via rss subscribe via e-mail
print this post follow me on twitter



 
  Feedback:

comments

0 Responses to "Viewing Linked Server Information in SQL Server 2005/2008"
 

Copyright © 2009-2011 All Rights Reserved for SQLServerCurry.com by Suprotim Agarwal | Terms and Conditions