Locking in db2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sachinksharma
    New Member
    • Feb 2013
    • 3

    Locking in db2

    how to remove locks in db2 version 9.7
  • Anas Mosaad
    New Member
    • Jan 2013
    • 185

    #2
    What is your problem exactly. Please elaborate more details. Why do you want to release a lock?

    Comment

    • sachinksharma
      New Member
      • Feb 2013
      • 3

      #3
      Lock

      My db is not working due to lock, one of the table has many lock. I have already take the snaphot for "LOCKS" at the time of locking & force the same.
      But i want to know the exact procedue to avoid the lock in application.

      Comment

      • Anas Mosaad
        New Member
        • Jan 2013
        • 185

        #4
        I'm sure you don't want to make your application behave incorrectly -you don't want to release being held by an application.

        I believe you need to find a way to make your queries perform better; check the query plans to make sure you have proper indeces. May be you need to increase the max_locks and (change lock_timeout to something like 120). You need to make sure your queries run the correct isolation level. If you have a database migrated from earlier release, make sure you have Currently committed option enabled -it's not enabled by default on migrated databases.

        Comment

        • vijay2082
          New Member
          • Aug 2009
          • 112

          #5
          Hi,

          Set the lock timeout dbcfg param as 60 or more depending on the application setup and setup a deadlock monitor as well.



          You can also want to set curr_commit value to help you in unnecessary locking.

          Also in V9.7 memory for locking requirements has been increased so you should increase the locklist and maxlock to allow more memory for the locks in V9.7.

          Cheers, Vijay

          Comment

          Working...