Db2

Db2

Connect with Db2, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
  • 1.  Error Connecting to DB2

    Posted Mon June 12, 2023 09:25 AM

    I have downloaded and installed DB2 Community server on Windows 11 desktop machine. But I am not able to connect to it using IBM DMC or a third-party software like DBeaver. I receive this error: A DRDA Data Stream Syntax Error was detected. Reason: 0x3. ERRORCODE=-4499, SQLSTATE=58009.
    I have spent hours looking for solutions online, but none of those solutions worked (making sure JDBC driver is same as the DB2 version, disabling firewall etc.). 
    Can anyone please help me solving this problem?
    I should add that I am only able to connect to work with databases using db2cmd. Here is some information about my setup:
    db2set -all
    [e] DB2PATH=C:\DB2\IBM\SQLLIB
    [i] DB2INSTPROF=C:\ProgramData\IBM\DB2\DB2COPY1
    [i] DB2COMM=TCPIP
    [g] DB2_EXTSECURITY=NO
    [g] DB2_COMMON_APP_DATA_PATH=C:\ProgramData
    [g] DB2SYSTEM=C102-LT-0308
    [g] DB2PATH=C:\DB2\IBM\SQLLIB
    [g] DB2INSTDEF=DB2
    [g] DB2ADMINSERVER=DB2DAS00



    ------------------------------
    Hamed D
    ------------------------------


  • 2.  RE: Error Connecting to DB2

    Posted Mon June 12, 2023 10:06 AM
    Edited by Jan Nelken Mon June 12, 2023 06:36 PM

    What is your connection string?

    What port Db2 is listening on?

    What is DB2COMM environment variable set to?



    ------------------------------
    Jan Nelken
    ------------------------------



  • 3.  RE: Error Connecting to DB2

    Posted Mon June 12, 2023 10:19 AM

    jdbc:db2://{host}[:{port}]/{database} 

    port 11080 (which is http port for DMC).

    DBCOMM=TCPIP

    Meanwhile, my DB2 version is 11.5.8000.317 and 11.5.8.0 is JDBC driver on DBeaver.



    ------------------------------
    Hamed D
    ------------------------------



  • 4.  RE: Error Connecting to DB2

    Posted Mon June 12, 2023 10:29 AM

    Thank you. Now it is resolved.

    You asked me the right question which just led me to answer. my port number is actually 25000 and now its finally connected. 



    ------------------------------
    Hamed D
    ------------------------------