SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Exporting Multiple SSIS packages from MSDB


Exporting Multiple SSIS packages from MSDB

Author
Message
anilkumar0902
anilkumar0902
Grasshopper
Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)

Group: General Forum Members
Points: 20 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 ?
CozyRoc
CozyRoc
SSCertifiable
SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)

Group: General Forum Members
Points: 6476 Visits: 2235
Yes, you can create a script to do it.

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


lduvall
lduvall
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1100 Visits: 396
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.
Elliott Whitlow
Elliott Whitlow
SSC-Insane
SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)

Group: General Forum Members
Points: 23342 Visits: 5314
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
lduvall
lduvall
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1100 Visits: 396
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.
Elliott Whitlow
Elliott Whitlow
SSC-Insane
SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)

Group: General Forum Members
Points: 23342 Visits: 5314
How many packages and did you use paths in SSIS?

CEWII
lduvall
lduvall
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1100 Visits: 396
47. Yes, I used paths, but I can still access those paths from my test box.
SQLRNNR
SQLRNNR
SSC Guru
SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)

Group: General Forum Members
Points: 65129 Visits: 18570
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, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

SQLRNNR
SQLRNNR
SSC Guru
SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)

Group: General Forum Members
Points: 65129 Visits: 18570
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, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

Elliott Whitlow
Elliott Whitlow
SSC-Insane
SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)

Group: General Forum Members
Points: 23342 Visits: 5314
I was thinking about adding to the utility I wrote for DTS to do this as well..

CEWII
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search