SQL Server Performance

Running a package that calls another package

Discussion in 'SQL Server 2005 Integration Services' started by podgehb, Jul 6, 2007.

  1. podgehb New Member

    I am trying to run a SSIS package (called "Parent") that calls another package (called "Child"). The packages are stored in SQL Server (MSDB database) and are called from a console app by the code below:

    Public Shared Function RunPackage(ByVal server As String, _
    ByVal userName As String, _
    ByVal password As String, _
    ByVal packageName As String, _
    ByVal packagePassword As String) As String

    Dim pkg As New Package
    Dim app As New Application
    Dim pkgResults As DTSExecResult
    Dim result As String = ""

    app.PackagePassword = packagePassword
    pkg = app.LoadFromSqlServer(packageName, server, userName, password, Nothing)
    pkgResults = pkg.Execute()
    result = pkgResults.ToString() & vbNewLine

    For Each err As DtsError In pkg.Errors
    result += "Task: " & err.Source & vbNewLine
    result += ParseErrorMessage(err.Description) & vbNewLine

    Return result

    End Function

    If I just run the Child package with this code, then it works! But is I run the Parent package from the same code, then it fails with this error: "Error 0x80004002 while preparing to load the package. No such interface supported".

    The only difference between the 2 packages is that the Parent calls the Child, and the Child calls nothing.

    The Connection Manager in Parent used to connect to Child uses SQL Server Authentication and it needs to be that.

    My question: From VB.NET, how do I run a SSIS package that calls another package?
  2. dineshasanka Moderator

    Is this working in Visual Studio.

    I had the same issue even in Visual Studio.

    problem is that, I had object which had only error path. problem solved when I include dummay succees path. I included just a Rowcount data task!

    Contributing Editor, Writer & Forums Moderator

    Visit my Blog at
  3. satya Moderator

  4. podgehb New Member

    It works now. You need to put "<MTAThread()> _" ahead of "Sub Main()" in the console app.

Share This Page