Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

removing linkedservers Expand / Collapse
Author
Message
Posted Friday, July 12, 2013 9:13 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Yesterday @ 8:21 PM
Points: 417, Visits: 2,558
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.


Thanks,
SueTons.


Regards,
SQLisAwe5oMe.
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: Saturday, September 20, 2014 7:07 AM
Points: 803, Visits: 720
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
WHERE definition LIKE '%SERVERNAME%'

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, www.sommarskog.se
Post #1473286
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse