Sample Header Ad - 728x90

Is there a way to examine SQL Jobs for references to linked servers?

1 vote
2 answers
3673 views
In preparation for migrating a server farm to the cloud, I am attempting to enumerate all the linked servers that have been defined over the years. I also need to find (and correct) the code that references these linked servers. Here is something I threw togetether to help identify names of objects that refer to the linked server, but this only works against stored procs, views, functions and triggers: declare @sql varchar(2000) select @SQL = 'use ?; print ''?''; print replicate(''-'',len(''?'')); print '' ''; select object_name(sc.id) from syscomments sc where text like ''%TheLinkedServer%'' ' exec sp_msforeachdb @sql I know I will have to crack open the DTS/SSIS packages...I am just trying to get as many finished as quickly as possible.
Asked by datagod (7141 rep)
Sep 26, 2012, 06:20 PM
Last activity: May 8, 2020, 04:18 AM