none
-805 Error when pulling data from a DB2 data source in ADF

    Question

  • We have created an Azure Data Factory connection and the connection succeeds when we click "Test Connection". However, whenever when we try to pull data from DB2, using this connection, we get an error that says:

    -805,Source=Microsoft.DataTransfer.ClientLibrary.Db2Connector,''Type=Microsoft.HostIntegration.DrdaClient.DrdaException,Message=The package corresponding to an SQL statement execution request was not found."

    We have found documentation from MSDN stating this: 

    "If you receive an error message that states 'The package corresponding to an SQL statement execution request was not found. SQLSTATE=51002 SQLCODE=-805'. The reason is a needed packages is not created for normal user on such OS. Follow these instructions according to your DB2 server type:

    • DB2 for i (AS400): let power user create collection for the login user before using copy activity. Command: 'create collection <username>'
    • DB2 for z/OS or LUW: use a high privilege account - power user or admin with package authorities and BIND, BINDADD, GRANT EXECUTE TO PUBLIC permissions - to run the copy activity once, then the needed packages is automatically created during copy. Afterwards, you can switch back to normal user for your subsequent copy runs."

    We have tried both of the suggested solutions and neither has worked for us. 

    We can get data when using an admin account on the DB2, however we do not want to leave those credentials in the connection settings in Prod. The other user account, unlike what the solution above states, still cannot get data from the Mainframe, and receives the "-805... The SQL package corresponding to an SQL statement execution request was not found".

     Do we simply have to give the replacement account higher permissions or is there another way around this? 

    Thanks anyone who is willing to help!

    Friday, July 27, 2018 2:07 PM

All replies

  • Hi,

    Not sure about the root cause, as a workaround, you could use the admin account to connect to the DB2 store.

    To avoid putting credentials in connection string, ADFv2 enables you reference the credentials storing in the  Azure Key Vault.

    Thanks.

    Monday, July 30, 2018 4:36 AM