none
DB2 adapter connection attempt error RRS feed

  • Question

  • I have joined a team that is working on connecting BizTalk 2006 R2 to a DB2 database hosted on IBM z/OS. In using the DB2 adapter provided by the adapter pack, they have encountered the following error

     

    Could not connect to data source 'My Data Source':

    The network connection was terminated because the host failed to send any data. SQLSTATE: 08S01, SQLCODE: -605

     

    They have been looking around and found no solution to the situation. If custom .NET application code is written, in conjunction with the IBM DB2 .NET provider, connection to the DB2 database can be made with no problems. My colleagues don't have much experience with BizTalk and DB2 (mainframe), and I have none prior to this. In effort to better understand what is going on, I used Wireshark to record the traffic for successful database connections and failed ones (as above). What I observe is DB2 traffic is based on the DRDA protocol, and the reason why the above error occurs is reasoned in the SECCHKRM packet (or code point) from the server:

     

    DRDA (Security Check)
        DDM (SECCHKRM)
            Length: 55
            Magic: 0xd0
            Format: 0x02
                0... = Reserved: Not set
                .0.. = Chained: Not set
                ..0. = Continue: Not set
                ...0 = Same correlation: Not set
                DSS type: RPYDSS (2)
            CorrelId: 0
            Length2: 49
            Code point: SECCHKRM (0x1219)
        Parameter (Severity Code)
            Length: 6
            Code point: SVRCOD (0x1149)
            Data (ASCII):
            Data (EBCDIC):
        Parameter (Security Check Code)
            Length: 5
            Code point: SECCHKCD (0x11a4)
            Data (ASCII):
            Data (EBCDIC):
        Parameter (Server Diagnostic Information)
            Length: 34
            Code point: SRVDGN (0x1153)
            Data (ASCII): \304\331\304\301@\301\331z@\301\344\343\310\305\325\343\311\303\301\343\311\326\325@\206\201\211\223\205\204
            Data (EBCDIC):
    DRDA AR: AUTHENTICATION failed

     

    It puzzled me why the same credentials would work with the .NET DB2 provider, but not with the BizTalk adapter. What was immediately noticable and intriguing was how the .NET DB2 provider sticks multiple DRDA DDM code points together in a single TCP segment, while the BizTalk adapter doesn't. I think this manner is referred to as "chaining" of DDM code points?

     

    .NET DB2 provider

     

    No.     Time        Source                Destination           Protocol Info

          1 0.000000    [client IP]         [DB2 server IP]          TCP      kpop > 50000 [SYN] Seq=0 Win=65535 Len=0 MSS=1460 WS=1

          2 0.000399    [DB2 server IP]          [client IP]         TCP      50000 > kpop [SYN, ACK] Seq=0 Ack=1 Win=16384 Len=0 MSS=1460 WS=0

          3 0.000414    [client IP]         [DB2 server IP]          TCP      kpop > 50000 [ACK] Seq=1 Ack=1 Win=65536 [TCP CHECKSUM INCORRECT] Len=0

          4 0.000532    [client IP]         [DB2 server IP]          DRDA     EXCSAT | ACCSEC

          5 0.038162    [DB2 server IP]          [client IP]         DRDA     EXCSATRD | ACCSECRD

          6 0.041829    [client IP]         [DB2 server IP]          DRDA     ACCSEC | SECCHK | ACCRDB

          7 0.083626    [DB2 server IP]          [client IP]         TCP      50000 > kpop [ACK] Seq=108 Ack=542 Win=65535 Len=0

          8 0.190534    [DB2 server IP]          [client IP]         DRDA     ACCSECRD | SECCHKRM | ACCRDBRM | SQLCARD

          9 0.199776    [client IP]         [DB2 server IP]          DRDA     PRPSQLSTT | SQLATTR | SQLSTT | OPNQRY

         10 0.293307    [DB2 server IP]          [client IP]         TCP      [TCP segment of a reassembled PDU]

         11 0.293359    [DB2 server IP]          [client IP]         TCP      [TCP segment of a reassembled PDU]

         12 0.293377    [client IP]         [DB2 server IP]          TCP      kpop > 50000 [ACK] Seq=870 Ack=1444 Win=64092 [TCP CHECKSUM INCORRECT] Len=0

         13 0.293404    [DB2 server IP]          [client IP]         TCP      [TCP segment of a reassembled PDU]

         14 0.293452    [DB2 server IP]          [client IP]         TCP      [TCP segment of a reassembled PDU]

         15 0.293461    [client IP]         [DB2 server IP]          TCP      kpop > 50000 [ACK] Seq=870 Ack=2516 Win=65536 [TCP CHECKSUM INCORRECT] Len=0

         16 0.293855    [DB2 server IP]          [client IP]         TCP      [TCP segment of a reassembled PDU]

         17 0.293908    [DB2 server IP]          [client IP]         DRDA     SQLDARD

         18 0.293918    [client IP]         [DB2 server IP]          TCP      kpop > 50000 [ACK] Seq=870 Ack=3588 Win=64464 [TCP CHECKSUM INCORRECT] Len=0

         19 0.293957    [DB2 server IP]          [client IP]         DRDA     QRYDSC

         20 0.294008    [DB2 server IP]          [client IP]         DRDA     QRYDTA

         21 0.294017    [client IP]         [DB2 server IP]          TCP      kpop > 50000 [ACK] Seq=870 Ack=4660 Win=65536 [TCP CHECKSUM INCORRECT] Len=0

         22 0.294023    [DB2 server IP]          [client IP]         DRDA     SQLCARD

         23 0.295346    [client IP]         [DB2 server IP]          DRDA     RDBCMM

         24 0.297868    [DB2 server IP]          [client IP]         DRDA     ENDUOWRM | SQLCARD

         25 0.421392    [client IP]         [DB2 server IP]          DRDA     PRPSQLSTT | SQLATTR | SQLSTT | OPNQRY

         26 0.456504    [DB2 server IP]          [client IP]         DRDA     SQLDARD | OPNQRYRM | TYPDEFNAM | QRYDSC | QRYDTA | ENDQRYRM | TYPDEFNAM | SQLCARD

         27 0.456756    [client IP]         [DB2 server IP]          DRDA     RDBCMM

         28 0.488311    [DB2 server IP]          [client IP]         DRDA     ENDUOWRM | SQLCARD

         29 0.498806    [client IP]         [DB2 server IP]          DRDA     PRPSQLSTT | SQLATTR | SQLSTT | OPNQRY

         30 0.630477    [DB2 server IP]          [client IP]         TCP      50000 > kpop [ACK] Seq=5157 Ack=1579 Win=65171 Len=0

         31 0.788165    [DB2 server IP]          [client IP]         DRDA     SQLDARD | OPNQRYRM | TYPDEFNAM | QRYDSC | QRYDTA

         32 0.788203    [DB2 server IP]          [client IP]         DRDA     ENDQRYRM

         33 0.788225    [client IP]         [DB2 server IP]          TCP      kpop > 50000 [ACK] Seq=1579 Ack=5815 Win=64380 [TCP CHECKSUM INCORRECT] Len=0

         34 0.788648    [client IP]         [DB2 server IP]          DRDA     RDBCMM

         35 0.795951    [DB2 server IP]          [client IP]         DRDA     ENDUOWRM | SQLCARD

         36 0.807365    [client IP]         [DB2 server IP]          DRDA     PRPSQLSTT | SQLATTR | SQLSTT | OPNQRY

         37 0.838046    [DB2 server IP]          [client IP]         DRDA     SQLDARD | OPNQRYRM | TYPDEFNAM | QRYDSC | QRYDTA | ENDQRYRM | TYPDEFNAM | SQLCARD

         38 0.838328    [client IP]         [DB2 server IP]          DRDA     RDBCMM

         39 0.841866    [DB2 server IP]          [client IP]         DRDA     ENDUOWRM | SQLCARD

         40 0.973506    [client IP]         [DB2 server IP]          TCP      kpop > 50000 [ACK] Seq=1906 Ack=6304 Win=65482 [TCP CHECKSUM INCORRECT] Len=0

     

    BizTalk DB2 adapter

     

    No.     Time        Source                Destination           Protocol Info

          1 0.000000    [client IP]          [DB2 server IP]          TCP      28165 > 50000 [SYN] Seq=0 Win=8192 Len=0 MSS=1460 WS=8

          2 0.002587    [DB2 server IP]          [client IP]          TCP      50000 > 28165 [SYN, ACK] Seq=0 Ack=1 Win=16384 Len=0 MSS=1460 WS=0

          3 0.010146    [client IP]          [DB2 server IP]          TCP      28165 > 50000 [ACK] Seq=1 Ack=1 Win=65536 Len=0

          4 0.019698    [client IP]          [DB2 server IP]          DRDA     EXCSAT

          5 0.020849    [DB2 server IP]          [client IP]          DRDA     EXCSATRD

          6 0.034699    [client IP]          [DB2 server IP]          DRDA     ACCSEC

          7 0.036584    [DB2 server IP]          [client IP]          DRDA     ACCSECRD

          8 0.042031    [client IP]          [DB2 server IP]          DRDA     SECCHK

          9 0.046350    [DB2 server IP]          [client IP]          DRDA     SECCHKRM

         10 0.046642    [DB2 server IP]          [client IP]          TCP      50000 > 28165 [FIN, ACK] Seq=160 Ack=200 Win=65336 Len=0

         11 0.053787    [client IP]          [DB2 server IP]          TCP      28165 > 50000 [ACK] Seq=200 Ack=161 Win=65536 Len=0

         12 0.056891    [client IP]          [DB2 server IP]          DRDA     ACCRDB

         13 0.058084    [DB2 server IP]          [client IP]          TCP      50000 > 28165 [RST, ACK] Seq=161 Ack=295 Win=0 Len=0

     

    Initially I did not think that should be a problem. Another test with the BizTalk adapter against a Windows-based instance of DB2 succeeds on my colleagues machine. Since it was the BizTalk adapter, no chaining was done and it could authenticate and connect just fine. Later on, I did come across this KB891062 for Host Integration Server 2004, which illustrates the exact same error codes. Could there similarly be some pattern in the BizTalk DB2 adapter that is contibuting to this error we are facing? Or is there something about the DRDA exchange that needs to be further looked into? I am not familiar with the DRDA protocol and will need to know what to study on it.
    Wednesday, August 27, 2008 6:13 AM

Answers

  • BizTalk DB2 Adapter only supports connections direct to the z/OS mainframe host. It does not support proxy connections via DB2Connect, which is what the customer users here.

     

    The reason why the DB2 Adapter only works with a direct connection, is due to legal restrictions. Technically it is possible to work a connection with DB2Connect, but IBM has made it a proprietary node and prevented other parties from legally establishing the correct DRDA sequence to connect to it.

    Friday, October 24, 2008 7:25 AM

All replies

  • The first thing I would suggest is looking at the IBM Redbooks on DB2. The root site for searching all of the IBM Redbooks (be sure to specify a search using full text) is http://www.redbooks.ibm.com/. One book I found helpful for you would be Distributed Functions of DB2 for z/OS and OS/390 - http://www.redbooks.ibm.com/abstracts/SG246952.html?Open. In the PDF on page 242 (page 218 for the book's content) is a diagram of the different DRDA protocol messages - when each is used for connectivity purposes.

     

    Page 242 describes this as the DB2 Connect Flow and uses the multiple command per line syntax, but on page 244, there is another diagram of the same general operations using single command per line syntax, but it describes it as DB2 Connect V8 Server. The paragraph under the description of the V8 flow diagram mentions that "if you are using the DB2 UDB for Multiplatforms V8, the runtime client uses the DRDA protocol to talk to DB2 Connect". So this sounds like client is the thing to check.

     

    Could you see if your friend that could get BizTalk to run successfully is using a different version of the DB2 client than you are using? Also, check to see if your friend is using a V8 client or if you are?

     

    Thanks,

    Tuesday, September 2, 2008 2:35 AM
    Moderator
  • BizTalk DB2 Adapter only supports connections direct to the z/OS mainframe host. It does not support proxy connections via DB2Connect, which is what the customer users here.

     

    The reason why the DB2 Adapter only works with a direct connection, is due to legal restrictions. Technically it is possible to work a connection with DB2Connect, but IBM has made it a proprietary node and prevented other parties from legally establishing the correct DRDA sequence to connect to it.

    Friday, October 24, 2008 7:25 AM