Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
DB2 LOCKSIZE=ANY - DEADLOCKS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1578
Location: Chennai

PostPosted: Sat Jul 07, 2018 12:02 am    Post subject: DB2 LOCKSIZE=ANY - DEADLOCKS
Reply with quote

Hi,

We are facing deadlocks in a DB2 table and the table is created with LOCKSIZE=ANY.

Manual says that ANY lets DB2 choose the locking size.

Is it possible to determine what LOCKSIZE was chosen by DB2 during a period of deadlock. We have BMC DB2 tools and SMF.

Regards,
Vasanth.S
Back to top
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1942
Location: NY,USA

PostPosted: Mon Jul 09, 2018 11:41 pm    Post subject:
Reply with quote

Usually it will be LOCKSIZE PAGE
Change to LOCKSIZE ROW and watch , if you see frequent contention.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1578
Location: Chennai

PostPosted: Tue Jul 10, 2018 1:31 am    Post subject:
Reply with quote

Thank you.
Would it be ok to change it to ROW without identifying what level locking was used prior to the deadlock. I thought we could go one lower level of lock than the lock that caused deadlocks
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1942
Location: NY,USA

PostPosted: Wed Jul 11, 2018 9:30 pm    Post subject:
Reply with quote

LOCKSIZE ROW is the lower level than LOCKSIZE PAGE. I don't think LOCKSIZE ANY would use LOCKSIZE ROW by itself in a situations like when LOCKSIZE PAGE is not sufficient.

I would look at LOCK ESCALATIONS too to know what it is defined.

This is my understanding but double check with DBA and if its different than above then I would learn something.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2454
Location: Netherlands, Amstelveen

PostPosted: Thu Jul 12, 2018 3:14 pm    Post subject:
Reply with quote

The Keys to Understanding Locking for DB2 for zOS (PDF alert)

https://share.confex.com/share/121/webprogram/Handout/Session13956/The%20Keys%20to%20Understanding%20Locking.pdf
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1578
Location: Chennai

PostPosted: Fri Jul 13, 2018 3:05 am    Post subject:
Reply with quote

Thanks Rohit and Peter. I will review the information provided
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Deadlocks in two instances of a cobol... sourabh jain COBOL Programming 4 Mon Mar 03, 2008 5:32 pm
No new posts Reason for Deadlocks in IDMS database sandhyalohi IDMS/ADSO 6 Wed Aug 22, 2007 11:51 pm
No new posts Locksize for tables radhakrishnan82 DB2 2 Wed Apr 13, 2005 3:17 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us