Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Powershell Package SSIS and 2008 R2 vs 2012

$
0
0

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.


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>