DB2 multi-thread application and sql error Log full

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • newentry
    New Member
    • Apr 2013
    • 2

    #1

    DB2 multi-thread application and sql error Log full

    Dear all,

    I have the following situation using DB2 v9.5 in the multi-threaded way.

    1. I created 30 working threads using _beginthread(.. .) C function.
    2. For each working thread I put the following sequence at the beginning:
    sqleBeginCtx(.. .)
    sqleAttachToCtx (...)
    connect to database
    then, I'm using a semaphore to wait for something to do.
    3. After each database operation I have a commit class which executes a EXEC SQL COMMIT command;

    My problem is that sometimes I receive a sql error SQL0964C.

    My application is running non stop with a average of 100.000 sql transactions per day.The number of primary/secondary logs is 4/10(each 250 * 4K).The sql error appears once a month.

    Do you have any clue regarding this behaviour?

    Thanks.
  • vijay2082
    New Member
    • Aug 2009
    • 112

    #2
    Hi, certainly this behaviour is not relared to DB2 being multithreaded. Looks like there is a bug in your application coding which is not commiting appropriately or some transaction is using more logs than expected.

    Coupld of suggestions. Try increase your primary logs ( required deactivating the database). This will give you more window to diagnose your issue. Look out for any transaction which is holding active log for a long time.

    You can also work with your DBA and look at the utilization of transaction log and increase it appropriately.

    Can you paste the error snippet from db2diag.log file for the error along with a database snapshot and db cfg for the database for more information.

    Cheers, Vijay

    Comment

    • newentry
      New Member
      • Apr 2013
      • 2

      #3
      Thank you for your reply.

      You're right, increasing primary logs solved this problem.
      But what is "commiting appropriately" ?

      I have the following operations:
      Open cursor for update
      fetch cursor
      insert/update from current position to another table
      delete from current position
      commit/rollback

      So, each operation is followed by commit operation.It seems there's no reason to need more log files.
      One record involved in this operation has 2 Ko max.


      Best regards.

      Comment

      Working...