Created
July 3, 2013 11:08
-
-
Save mintsoft/5917067 to your computer and use it in GitHub Desktop.
Dumps the content of SQL Tasks in SSIS dtsx packages to files for easier diff-ing in source control.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import-module SSIS | |
$ssis_package = "D:\MyFile.dtsx"; | |
$package = Get-ISPackage -path $ssis_package; | |
$package.Executables | Where-Object { $_.InnerObject -like 'Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.ExecuteSQLTask' } | %{ $fn = $_.Name+".sql"; $_.InnerObject.SqlStatementSource > $fn } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment