|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Friday, April 27, 2012 11:44 AM
Points: 2,
Visits: 48
|
|
If we need to export a package from MSDB into the file system we can do it using the SQL Management Studio...However, if we need to export all the SSIS packages available from MSDB onto the file system all at once without doing one at a time...Is there a smart way to achieve this ?
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Yesterday @ 11:51 AM
Points: 1,106,
Visits: 2,111
|
|
Yes, you can create a script to do it.
--- SSIS Tasks Components Scripts Services | http://www.cozyroc.com/
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, March 19, 2013 12:13 PM
Points: 115,
Visits: 288
|
|
| I have a similar question (I think). I'm attempting to practice upgrading from SQL 2005 to SQL 2008 on my test machine. I've moved over all my db's and log-ins. I'm wanting to move the SSIS packages, too. On my production server, they're all stored in the msdb. Can I just restore the prod msdb over my test msdb? I'm thinking that seems too simple and I'm missing something.
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 12:02 PM
Points: 5,854,
Visits: 4,873
|
|
Keep in mind that msdb is a system database and contains information related to the source system. Given that, don't restore msdb from another server.
If you know know the path(in SSIS) you can build a script using dtutil.exe to pull them out of the server.
A while back I wrote a utility to import and extract DTS packages from a server.. Its on CodePlex.. I looked at doing the same for SSIS but didn't think there was a great need, I might have been wrong..
CEWII
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, March 19, 2013 12:13 PM
Points: 115,
Visits: 288
|
|
| Pooh. Ok, what if I go into the production server, connect to Integration Services & when I get to the export step, I export it to my test SQL box from there? I'm trying to avoid having to export to the file system and then re-import, simply because there are so many packages and I want to save some time. If that's not a good idea, though, I will do it the long way.
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 12:02 PM
Points: 5,854,
Visits: 4,873
|
|
How many packages and did you use paths in SSIS?
CEWII
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, March 19, 2013 12:13 PM
Points: 115,
Visits: 288
|
|
| 47. Yes, I used paths, but I can still access those paths from my test box.
|
|
|
|
|
SSCoach
         
Group: General Forum Members
Last Login: 2 days ago @ 1:46 PM
Points: 18,732,
Visits: 12,329
|
|
lduvall (1/21/2011) Pooh. Ok, what if I go into the production server, connect to Integration Services & when I get to the export step, I export it to my test SQL box from there? I'm trying to avoid having to export to the file system and then re-import, simply because there are so many packages and I want to save some time. If that's not a good idea, though, I will do it the long way.
I have used tsql and SSIS to actually do this for me. You can take either the latest package or all revisions, dump them to a staging table and then transfer that table to the new server and then copy the data back into the appropriate tables (since data export and standard methods in ssis don't see the dts and ssis tables in msdb). Much faster and rather easy to do.
Jason AKA CirqueDeSQLeil I have given a name to my pain... MCM SQL Server 2008
SQL RNNR
Posting Performance Based Questions - Gail Shaw Posting Data Etiquette - Jeff Moden Hidden RBAR - Jeff Moden VLFs and the Tran Log - Kimberly Tripp
|
|
|
|
|
SSCoach
         
Group: General Forum Members
Last Login: 2 days ago @ 1:46 PM
Points: 18,732,
Visits: 12,329
|
|
Here are three sample scripts. You would need to modify the first two to have them dump into the staging table.
/* SQL 2005 */ SELECT T1.* FROM dbo.sysdtspackages90 AS T1 INNER JOIN ( SELECT [id], MAX([verbuild]) AS [verbuild] FROM dbo.sysdtspackages90 GROUP BY [id]) AS T2 ON T1.[id] = T2.[id] AND T1.[verbuild] = T2.[verbuild] /* sql2008 */ SELECT T1.* FROM dbo.sysssispackages AS T1 INNER JOIN ( SELECT [id], MAX([verbuild]) AS [verbuild] FROM dbo.sysssispackages GROUP BY [id]) AS T2 ON T1.[id] = T2.[id] AND T1.[verbuild] = T2.[verbuild] /*Extract to File System SQL 2005*/ select 'dtutil /SQL "' +[p].[name] + '" /COPY FILE;"c:\myTestPackages\'+[p].[name]+'.dtsx"' from msdb.dbo.sysdtspackages90 [p]
And here is a sample of inserting into the appropriate table from the staging table on SQL 2005
Insert into sysdtspackages (name,id,versionid,description,categoryid,createdate,owner,packagedata,owner_sid,packagetype) Select name,id,versionid,description,categoryid,createdate,owner,packagedata,owner_sid,packagetype From DTSPackageTransfer Where Description <> ''
I sense a blog post coming on this topic.
Jason AKA CirqueDeSQLeil I have given a name to my pain... MCM SQL Server 2008
SQL RNNR
Posting Performance Based Questions - Gail Shaw Posting Data Etiquette - Jeff Moden Hidden RBAR - Jeff Moden VLFs and the Tran Log - Kimberly Tripp
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 12:02 PM
Points: 5,854,
Visits: 4,873
|
|
I was thinking about adding to the utility I wrote for DTS to do this as well..
CEWII
|
|
|
|