IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DB2 LOCKSIZE=ANY - DEADLOCKS


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Sat Jul 07, 2018 12:02 am
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

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Mon Jul 09, 2018 11:41 pm
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: 1742
Location: Tirupur, India

PostPosted: Tue Jul 10, 2018 1:31 am
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

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Wed Jul 11, 2018 9:30 pm
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: 2481
Location: Netherlands, Amstelveen

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

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

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: 1742
Location: Tirupur, India

PostPosted: Fri Jul 13, 2018 3:05 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Deadlocks in two instances of a cobol... COBOL Programming 4
No new posts Reason for Deadlocks in IDMS database IDMS/ADSO 6
No new posts Locksize for tables DB2 2
Search our Forums:

Back to Top