[IronPython] IronPython and SSIS issue - need help...bad

Rob Weiss rweiss at chesapeakebay.net
Thu Feb 5 18:23:48 CET 2009




Rob Weiss wrote:
> 
> Cross posted on Mono Group as well...
> 
> After reading up on how to run ssis packages on mono, I came across a how
> to using IronPython.
> 
> Running it, I got this:
> 
> ** (C:\PROGRA~2\Mono-2.2\lib\IPCE\ipy\ipy.exe:4420): WARNING **:
> string/stringbu
> ilder marshalling conversion 29 not implemented Traceback (most recent
> call last):
>   File Microsoft.SqlServer.ManagedDTS, line unknown, in .ctor
> NotImplementedError: string/stringbuilder marshalling conversion 29 not
> implemen ted
> 
> ** (C:\PROGRA~2\Mono-2.2\lib\IPCE\ipy\ipy.exe:4420): WARNING **: Shutting
> down f inalizer thread timed out.
> 
> Does anyone have any idea as to why/what is causing this issue? I have the
> same problem when running against the same dll using a C# implementation
> of the same code that is executing in IronPython.
> 
> I figured that if there was a IronPython article on how to run ssis
> packages, that it would work, so I think it must be a config problem on my
> machines.
> 
> My dev box is Windows running Mono 2.2 and my prod box id RHEL running
> Mono
> 2.2 - what could be wrong? I am finding the DLLs ok, otherwise I would not
> be getting this far.
> 
> Help!! It I can get it to work in any fashion, I will publish the code for
> everyone to use, so they don't suffer my frustrations!!
> 
> TIA,
> Rob Weiss
> 
> 

Additional Info:

I removed mono from the equation. I loaded IP 2.0 on my windows xp pro dev
box. I ran the same script and got an error saying that it could not find
the DTS assembly, so I copied the DLL to the run directory, and executed it
again and got the following error:

C:\Program Files (x86)\IronPython 2.0\rob>..\ipy dts.py
running SSIS package . . .
Traceback (most recent call last):
  File "dts.py", line 64, in dts.py
  File "dts.py", line 18, in getpackage
  File "Microsoft.SqlServer.ManagedDTS", line unknown, in .ctor
IOError: Could not load file or assembly
'Microsoft.SqlServer.DTSRuntimeWrap, Ve
rsion=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of
its
 dependencies. The system cannot find the file specified.

Here is the code:
"""
Collection of utilities for programmatically
controlling SQL 2005 SQL Server Integration
Services (SSIS) packages with IronPython-1.1.1.
"""

import clr

clr.AddReference('Microsoft.SQLServer.ManagedDTS')

from Microsoft.SqlServer.Dts import Runtime

def getpackage(packagename):
    """
    Returns SSIS package with given name.
    Loads package from file.
    """
    app = Runtime.Application()
    return app.LoadPackage(packagename, None)

def getssisexecutables(package):
    """
    Returns collection of SSIS packages' Executables
    from a given SSIS package. 

    Example Executable:  DataFlow
    """
    return package.Executables 

def gettasks(executable):
    """
    Returns collection of SSIS tasks for a
    given executable. 
    
    Example - DataFlow Executable yields collection of 
    OLE DB Source, Copy Column, and Flat File Destination.
    """
    innobj = executable.InnerObject
    return innobj.ComponentMetaDataCollection
 
def gettaskobject(tasks, objectname):
    """
    Looks for object with objectname in
    collection of tasks (ComponentMetaDataCollection).
    Returns object if it finds it,
    False otherwise.
    """
    try:
        return tasks[objectname]
    except KeyError:
        return False

def setsqlforoledb(task, sqlstring):
    """
    Specific to OLEDB - directly manipulating
    SQL input to task.

    Sets the SQL string to sqlstring for the task.
    """
    task.CustomPropertyCollection['SqlCommand'].Value = sqlstring
    return 0

print 'running SSIS package . . .'
pkg = getpackage('Septic.dtsx')
success = pkg.Execute()

Any ideas?



-- 
View this message in context: http://www.nabble.com/IronPython-and-SSIS-issue---need-help...bad-tp21853213p21856691.html
Sent from the IronPython mailing list archive at Nabble.com.




More information about the Ironpython-users mailing list