creating an aquireConnection error

  • Hello, I have a ssis package that reads from hadoop via an ODBC source in a for loop. The ODBC connection is a bit flaky and occasionally there is an AcquireConnection error thus the reason for the loop so it reattempts. To make it easier to develop I would like to generate the error programmatically at runtime. What is the property to change to generate the following error

    ERROR: The AcquireConnection method call to the connection manager XXX failed with error code 0xC0014009.

    TIA

  • bark stuff (2/11/2016)


    Hello, I have a ssis package that reads from hadoop via an ODBC source in a for loop. The ODBC connection is a bit flaky and occasionally there is an AcquireConnection error thus the reason for the loop so it reattempts. To make it easier to develop I would like to generate the error programmatically at runtime. What is the property to change to generate the following error

    ERROR: The AcquireConnection method call to the connection manager XXX failed with error code 0xC0014009.

    TIA

    I think that you are going to need a script task.

    I found the following in some 2010 code (not written by me & apologies for the VB) which may be of interest:

    Public Sub Main()

    Dim ConnMgr As ConnectionManager

    Dim ConnStr As String

    Dim bFailure As Boolean = False

    For Each ConnMgr In Dts.Connections 'Loop over the connection managers

    ConnStr = ConnMgr.ConnectionString

    Dts.Events.FireInformation(1, "", "Connection string = " + ConnStr, "", 0, True)

    Try

    ConnMgr.AcquireConnection(Nothing)

    Dts.Events.FireInformation(1, "", "Connection acquired successfully on " + ConnMgr.Name, "", 0, False)

    Catch ex As Exception

    Dts.Events.FireError(-1, "", "Connection failed on " + ConnMgr.Name, "", 0)

    bFailure = True

    End Try

    Next

    If bFailure = True Then 'Output the result

    Dts.TaskResult = ScriptResults.Failure

    Else

    Dts.TaskResult = ScriptResults.Success

    End If

    End Sub

    It's not exactly what you want, but may be of help.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • cheers, that'll do.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply