Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

removing linkedservers Expand / Collapse
Posted Friday, July 12, 2013 9:13 PM


Group: General Forum Members
Last Login: Tuesday, February 9, 2016 1:51 PM
Points: 498, Visits: 2,892
Hi all,

I have to remove some linkedservers which connects to oracle and pull data and I need to remove some of them. What is the proper way to remove these?

Do I need to check before I drop or delete them? Please advise.


Post #1473279
Posted Saturday, July 13, 2013 2:39 AM

SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Thursday, February 11, 2016 8:30 AM
Points: 875, Visits: 836
You drop a linked server with sp_droplinkedserver. Obviously, if you have queries that refer to the server, these queries will stop working.

To find instances of these servers in stored procedures, you could do:

SELECT object_name(object_id)
FROM sys.sql_modules

Hopefully the server names are distinct enough to make this query useful.

Note that if it there are queries in client code, SSIS packages etc referring to these servers, the query above will not find them.

Erland Sommarskog, SQL Server MVP,
Post #1473286
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse