Hi,
I use SQL Server 2008 R2 and I load package from files with powershell.
I use this script :
$mySrvSQL = 'Srv07' $myFolderSSIS = '\\ContactBS' $repSource = '\\Srv01\Informatique Livraisons\BI\ContactBS\ ' [reflection.assembly]::LoadWithPartialName('Microsoft.SQLServer.ManagedDTS') $myApp = New-Object Microsoft.SQLServer.DTS.RunTime.Application Get-childItem -path $repSource | Where-Object { $_.Extension -eq '.dtsx' } | ForEach -process { $myPkg = $myApp.LoadPackage($_.FullName, $null) $myApp.SaveToSQLServerAs($myPkg, $null, ($myFolderSSIS + '\ ' + $_.BaseName), $mySrvSQL, $null, $null) Write-Host "$_ saved to $mySrvSQL" }
It work's fine !
Recently, I installed SQL Server 2012 on my workstation and it works bad now !
I get this message :
New-Object : Cannot find type [Microsoft.SQLServer.DTS.RunTime.Application]: make sure the assembly containing this type is loaded.
I've installed Features Pack components.
I've seen that I could use a PS-Drive \SQLServer:\SSIS but it seems that it doesn't work with SQL Server 2008 R2
Could I do the same things I done with the new SQL 2012 tools : Just Save a package in SQL from a file ?
Thank you for your help.
Ludovic.