Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

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

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?


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
	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
	insert #t
	EXEC ('SELECT ''' + @server + ''', name FROM [' + @server + '].msdb.dbo.sysdtspackages')
	fetch next from c into @server
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  
 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.02 seconds. Powered By: Snitz Forums 2000