The command prompt utility dtutil can be very handy when we want to quickly export an SSIS package from either file system to msdb or vice-versa.
For a quick demo, I created a package called “ProductPrice” uder the file system C:\packages, as shown in the screenshot below
Also, I created another package called “UpdatePrice” in SQL Server, which gets stored in msdb database, below is the screnshot
Now, let us see how we can quickly import or export these packages using cmd. For this we will be using the COPY option in the dtutil utility
- To copy package from file system to msdb
Run the below syntax from cmd:
dtutil /FILE C:\Packages\ProductPrice.dtsx /COPY SQL;ProductPrice
This copies/exports “ProductPrice” package from file system to msdb database as shown in the below screenshot
- To copy a package from msdb to file system
Run the below syntax from cmd:
dtutil /SQL UpdatePrice /COPY FILE;C:\Packages\UpdatePrice.dtsx
This copies/exports “UpdatePrice” package from msdb database to file system. Below is the screenshot
I have used “Windows Authentication” in this demo. To use mixed mode authentication or to export packages to a different server, we need to provide proper dtutil options, which can be found running the syntax dtutil /? from cmd utility.
how to add log to specific path using dtutil ?
[…] How to Copy or Export an SSIS Package Using Command Prompt Utility – DTUTIL […]
[…] How to Copy or Export an SSIS Package Using Command Prompt Utility – DTUTIL […]