SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 DTS Packages
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

prodigy2006
Yak Posting Veteran

66 Posts

Posted - 02/23/2010 :  10:40:11  Show Profile  Reply with Quote
Is it possible to find a list of servers on which DTS packages exist?

russell
Pyro-ma-ni-yak

USA
5072 Posts

Posted - 02/23/2010 :  12:10:45  Show Profile  Visit russell's Homepage  Reply with Quote
If all the servers are linked from one, you can execute this
Create Table #t (server sysname, dts sysname);

Declare @server sysname
Declare c Cursor
read_only
for
	select data_source from sys.servers where is_linked = 1 or data_source = @@servername
open c
fetch next from c into @server
while @@fetch_status = 0
begin
	insert #t
	EXEC ('SELECT ''' + @server + ''', name FROM [' + @server + '].msdb.dbo.sysdtspackages')
	fetch next from c into @server
end
close c
deallocate c

select distinct server from #t
drop table #t

Edited by - russell on 02/23/2010 12:11:41
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000