Getting DB2 SQL error: SQLCODE: -805, SQLSTATE: 51002 exception

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Srireddy
    New Member
    • Mar 2007
    • 7

    Getting DB2 SQL error: SQLCODE: -805, SQLSTATE: 51002 exception

    Hi, I was trying to update a column in a table in my DB using java code but after updating some rows it throws an exception like "exception in processcom.ibm. db2.jcc.b.SqlEx ception: DB2 SQL error: SQLCODE: -805, SQLSTATE: 51002, SQLERRMC: NULLID.SYSLH203 0X5359534C564C3 031". Can anyone have any idea about this, if some one has has any solution plz reply back ASAP... thanks in advance for your help.
  • ramesh jampala
    New Member
    • Mar 2007
    • 10

    #2
    Originally posted by Srireddy
    Hi, I was trying to update a column in a table in my DB using java code but after updating some rows it throws an exception like "exception in processcom.ibm. db2.jcc.b.SqlEx ception: DB2 SQL error: SQLCODE: -805, SQLSTATE: 51002, SQLERRMC: NULLID.SYSLH203 0X5359534C564C3 031". Can anyone have any idea about this, if some one has has any solution plz reply back ASAP... thanks in advance for your help.

    Hi,

    Your databases has only 3 packages of this kind.
    They are SYSLH200,201,20 2.
    But your query requires one more additional package SYSLH203. If you are a DBA, go to SQLLIB/BND directory then issue the following command

    db2 bind @db2cli.lst blocking all grant public sqlerror continue CLIPKG 5

    If you are application programmer, contact your DBA to perform above bind. You can bind upto CLIPKG 30.

    Comment

    • Srireddy
      New Member
      • Mar 2007
      • 7

      #3
      Hi Ramesh,
      Thanks for the help. After using that bind statement the updating the table is done but not to the fullest. It is done partially. After runing for some time it gave me the same error but little change in the code. The error is "com.ibm.db2.jc c.b.SqlExceptio n: DB2 SQL error: SQLCODE: -805, SQLSTATE: 51002, SQLERRMC: NULLID.SYSLH21E 0X5359534C564C3 031".
      Can you help me out again please.....
      Regards,
      Srinivasa Reddy.

      Comment

      • ramesh jampala
        New Member
        • Mar 2007
        • 10

        #4
        Originally posted by Srireddy
        Hi Ramesh,
        Thanks for the help. After using that bind statement the updating the table is done but not to the fullest. It is done partially. After runing for some time it gave me the same error but little change in the code. The error is "com.ibm.db2.jc c.b.SqlExceptio n: DB2 SQL error: SQLCODE: -805, SQLSTATE: 51002, SQLERRMC: NULLID.SYSLH21E 0X5359534C564C3 031".
        Can you help me out again please.....
        Regards,
        Srinivasa Reddy.

        Hi Srinu,
        This is expected only. It is asking for SYSLH21E means it is 31st package. maximum SYSLH packages are only 30. You can solve this problem by including commit statements after some rows are updated in your application or closing handles or cursors. But if you want to commit only after all records are updated, you can try with more SYSLH packages but as of my knowledge only 30 packages can be bound.

        Ramesh
        IBM Certified DB2 DBA
        IBM Certified UDB DBA

        Comment

        • svpriyan
          New Member
          • Apr 2009
          • 18

          #5
          Sqlcode=-805, sqlstate=51002

          i gave this in the prompt
          prompt >db2 bind @db2cli.lst blocking all grant public sqlerror continue CLIPKG 5

          i got an error like:

          Db21061e command line enviroment not initialized.


          wha to do with

          Comment

          • vijay2082
            New Member
            • Aug 2009
            • 112

            #6
            Your udb environment is not initialized properly. If you are usign a UNIX box then you need to execute the db2profile once you log on to your machine. Ask the DBA or the system admin to that for you and they will fix it.

            If its a widows box use start > run > db2cmd

            you will get a db2 command window. You can run your db2 commands over here.

            Change the path/directory to %DB2PATH%/bnd and then execute the below commnd once you are connected to the database.

            C:\Program Files\IBM\SQLLI B\bnd> db2 bind @db2cli.lst blocking all grant public sqlerror continue CLIPKG 15



            Regards

            Vijay

            Comment

            • vijay2082
              New Member
              • Aug 2009
              • 112

              #7
              Hi

              Look here for more details.



              Cheers, Vijay

              Comment

              Working...