Linked server to DB2 error

  • Greetings. I'm using SQL Server 2008 R2 Express, and linked server to a DB2 v9 NFM. The only way I am able to query the linked server is via OPENQUERY, which works fine. However, when I try to use the ROW_NUMBER() function, DB2 returns the following error:

    OLE DB provider "IBMDADB2" for linked server "Mirror" returned message

    "[DB2] SQL30020N Execution failed because of a Distributed Protocol Error

    that will affect the successful execution of subsequent commands and SQL statements:

    Reason Code "0x124C"("010B")"". SQLSTATE=58009

    ".

    Msg 7330, Level 16, State 2, Line 1

    Cannot fetch a row from OLE DB provider "IBMDADB2" for linked server "Mirror".

    I can run a query with ROW_NUMBER() directly on the DB2 server, but not via the linked server. I was wondering if anyone knew of a way around this problem. It is a huge hastle to run queries on the mainframe server via JCL, then have to FTP the output file back to my SQL Server. Any feedback would be greatly appreciated. Thanks.

    Greg
    _________________________________________________________________________________________________
    The glass is at one half capacity: nothing more, nothing less.

  • googling your message:

    https://www-304.ibm.com/support/docview.wss?uid=swg21433369

  • Zarko Jovanovic (11/2/2011)


    googling your message:

    https://www-304.ibm.com/support/docview.wss?uid=swg21433369%5B/quote%5D

    Zarko, I did find that one, but the link does not work. Thanks.

    Greg
    _________________________________________________________________________________________________
    The glass is at one half capacity: nothing more, nothing less.

  • Greg Snidow (11/2/2011)


    Zarko Jovanovic (11/2/2011)


    googling your message:

    https://www-304.ibm.com/support/docview.wss?uid=swg21433369%5B/quote%5D

    Zarko, I did find that one, but the link does not work. Thanks.

    The link worked fine for me, just took awhile to load... https://www-304.ibm.com/support/docview.wss?uid=swg21433369

    Here's what it said though:

    Cause

    DB2 Connect v9.1 is only compatible with a package name of a maximum length of 18 characters

    Resolving the problem

    Recreate the stored procedure such that the package name is no longer than 18 characters. DB2 Connect v9.5 and higher has support for package names up to 255 characters.

    Thanks,

    Jared

    Jared
    CE - Microsoft

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

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