removing linkedservers

  • 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.

  • 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.

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply