This project is read-only.

2012 support

Jul 16, 2012 at 6:21 PM

Does the SQLPSX run on the SQl 2012 version? Thanks

Jul 16, 2012 at 11:08 PM

It should and I've done some limited tested. If you have multiple versions of SQL Server components installed you may run into issues with loading the right assemblies. The current release tries to load 2008/2008 R2 assemblies and them falls back to try and load any SMO assemblies. If you 2012, 2008/2008 R2 and/or 2005 installed you'll want to make a slight change to the assembly loading logic in the SQL Server module as noted in this discussion thread:

Jul 24, 2012 at 3:16 PM

Thanks Chad,


I can import the SSIS module to SQLPS, The issue I am having is that when I try a copy-ISItemSQltoSQl

 the add-type fails to load the ManagedDTS dll.

It is not in the folder

C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies

 subfolder but there is a copy in


So  I changed the SSIS script to have (guesing a bit here)

if ( $Args[0] -eq 2005 )
    add-type -AssemblyName "Microsoft.SqlServer.ManagedDTS, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
    #add-type -Path "C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies\Microsoft.SQLServer.ManagedDTS.dll"
    #add-type -AssemblyName "Microsoft.SqlServer.ManagedDTS, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
    add-type -Path "C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SqlServer.ManagedDTS\v4.0_11.0.0.0__89845dcd8080cc91\Microsoft.SQLServer.ManagedDTS.dll"


but the add-type get a "This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded"

Thanks for you help!



Jul 24, 2012 at 11:15 PM

The SSIS assembly in SQL 2012 is different than 2005 or 2008/2008 R2. Powershell V2 uses .NET 3.5 and the SSIS assembly ManagedDTS is compiled as a .NET 4.0 assembly. A couple of suggested workarounds:

Use Powershell V3 (currently in Beta as of 7/24/2012).

Create a powershell.exe.config file to load .NET 4.0 (note some things like remoting will break to revert to 3.5 just remove the config file and close/open powershell.exe). Blog post which describes config file approach:

Use command-line utility dtutil.exe. Ships with 2005/2008/2008 R2/2012

Try the 2012 SSIS provider. There's probably a way to navigate to an SSIS package and call a save method. I haven't tested this:

$package = get-item packagName

$app = new-object ("Microsoft.SqlServer.Dts.Runtime.Application") 

$path = "pathtofolder"

$serverName = "DestinationServer"

$app.SaveToDtsServer($package, $null, $path, $serverName)


Jul 26, 2012 at 12:52 PM

Thanks Chad, the dtutil.exe is great and very simple to use.

Have taken that route with success.


Steve O'Reilly B.Eng



Suite 6, Ground Floor
26 Victoria street
Hamilton, HM12

+(1) 441 295 8894 (office)

+(1) 441 799 0008 (cellular)