Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Exporting Multiple SSIS packages from MSDB Expand / Collapse
Author
Message
Posted Friday, July 24, 2009 12:45 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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 ?

Post #759424
Posted Thursday, July 30, 2009 5:18 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, April 17, 2014 7:04 PM
Points: 1,114, Visits: 2,192
Yes, you can create a script to do it.

---
SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

Post #762297
Posted Friday, January 21, 2011 8:59 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Sunday, April 06, 2014 11:00 AM
Points: 121, Visits: 306
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.
Post #1051616
Posted Friday, January 21, 2011 9:31 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, January 03, 2014 3:52 PM
Points: 6,066, Visits: 5,277
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

Post #1051636
Posted Friday, January 21, 2011 9:37 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Sunday, April 06, 2014 11:00 AM
Points: 121, Visits: 306
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.
Post #1051640
Posted Friday, January 21, 2011 9:45 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, January 03, 2014 3:52 PM
Points: 6,066, Visits: 5,277
How many packages and did you use paths in SSIS?

CEWII
Post #1051649
Posted Friday, January 21, 2011 9:47 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Sunday, April 06, 2014 11:00 AM
Points: 121, Visits: 306
47. Yes, I used paths, but I can still access those paths from my test box.
Post #1051651
Posted Friday, January 21, 2011 9:50 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 6:16 PM
Points: 20,467, Visits: 14,101
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


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1051656
Posted Friday, January 21, 2011 9:55 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 6:16 PM
Points: 20,467, Visits: 14,101
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


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1051663
Posted Friday, January 21, 2011 10:32 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, January 03, 2014 3:52 PM
Points: 6,066, Visits: 5,277
I was thinking about adding to the utility I wrote for DTS to do this as well..

CEWII
Post #1051693
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse