Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
happyboy
Starting Member
21 Posts |
Posted - 2009-04-20 : 23:59:33
|
Dear all, I have many DTS packet in SQL server 2000, and I wrote script to extract all of them to my disk but when I run ii just display in result list of SQL query analyzer not to my disk.Please help me. thanks.here my codeDECLARE @CMD varchar(1000)DECLARE @TARGETDIR varchar(500)SET @TARGETDIR = 'C:\'DECLARE mycursor CURSOR FOR SELECT distinct 'DTSRUN /S ' + CONVERT(varchar(200), SERVERPROPERTY('servername')) + ' /E ' + ' /N ' + '"' + name + '"' + ' /F ' + '"' + @TARGETDIR + name + '.dts"' + ' /!X' FROM msdb.dbo.sysdtspackages P OPEN mycursorFETCH NEXT FROM mycursor INTO @CMDWHILE @@FETCH_STATUS = 0BEGIN exec master..xp_cmdshell @CMD FETCH NEXT FROM mycursor INTO @CMDEND CLOSE mycursorDEALLOCATE mycursor |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-05-09 : 22:47:31
|
Simply use DTS Package Migration Wizard and extract it to FileSystem. |
|
|
|
|
|