How to export hundreds of SSIS packages?

  • I need to export several hundreds of SSIS packages in the file format. What is the easier way to do it?

    Many thanks in advance.

  • I would say the quickest way to do it would be to generate a series of dtuil scripts for each package, dump them into a .bat file and execute that.

    http://msdn.microsoft.com/en-us/library/ms162820.aspx has all of the dtutil options. Copy would be my guess.

    Something like this should probably get you the dtutil statements:

    select 'dtutil /SQL "' +[p].[name] + '" /COPY FILE;"c:\myTestPackages\'+[p].[name]+'.dtsx"'

    from msdb.dbo.sysdtspackages90 [p]

    Keep in mind that I haven't actually ran that, but the options might need modification on the dtuil command.

    Hope that helps.

    Steve

  • Nice suggestion. I will test this myself and post back with results.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • S.K. (1/26/2010)


    I would say the quickest way to do it would be to generate a series of dtuil scripts for each package, dump them into a .bat file and execute that.

    http://msdn.microsoft.com/en-us/library/ms162820.aspx has all of the dtutil options. Copy would be my guess.

    Something like this should probably get you the dtutil statements:

    select 'dtutil /SQL "' +[p].[name] + '" /COPY FILE;"c:\myTestPackages\'+[p].[name]+'.dtsx"'

    from msdb.dbo.sysdtspackages90 [p]

    Keep in mind that I haven't actually ran that, but the options might need modification on the dtuil command.

    Hope that helps.

    Steve

    It helps a lot. Thank you so much once again.

  • Boy I like that! I hope it works - I will add it to my script repository.

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • ditto and done.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • One gotcha with the script as is, one will not be able to export packages specified with the "server storage". Use the encrypt action to change the protection level. Modify the script to allow for it and it should be fine.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply