In this recipe, we will
deploy an SSIS package (.dtsx
) to the SSIS package store.
Use the sample SSIS package—Customer Package.dtsx
—that came with the downloadable code of this book. Save this file to C:\SSIS
. We will deploy this to our SSIS instance, and save it under the \File System\QueryWorks
package folder. Alternatively, use a .dtsx
package that is readily available in your environment.
Let's explore the code required to deploy an SSIS .dtsx
file.
Open the PowerShell console by going to Start | Accessories | Windows PowerShell | Windows PowerShell ISE.
Add the
ManagedDTS
assembly as follows:#add ManagedDTS assembly Add-Type -AssemblyName "Microsoft.SqlServer.ManagedDTS, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
Add the following script and run:
$server = "KERRIGAN" #create new app $app = New-Object "Microsoft.SqlServer.Dts.Runtime.Application" #specify package to be deployed $dtsx = "C...