What is ROW LOCK and TABLE LOCK and how to implement them?

RDBMS from IBM and IBM's Hierarchical DBMS and Transaction Manager (IMS DC).
Post Reply
Vibha
Registered Member
Posts: 31
Joined: Tue Jul 16, 2013 7:35 pm

What is ROW LOCK and TABLE LOCK and how to implement them?

Post by Vibha »

Hello,

What is ROW LOCK & TABLE LOCK and how to implement them? Or if you can direct me, how can I perform ROW Lock and table Lock in DB2?
m4mainframe
New Member
Posts: 8
Joined: Thu Aug 08, 2013 12:34 pm

Re: What is ROW LOCK & TABLE LOCK and how to implement them?

Post by m4mainframe »

AFAIK, you cannot control directly the lock in DB2 but indirectly you can try doing that but not completely as for that matter DB2 have IRLM which manages it and if you still want to try to manipulate it, you can try it but cannot guarantee it and for that you need to know every resource using the DB2 objects - ROW, PAGE, TABLE, TableSpace etc with the ISOLATION Level you provide in the BIND Card, also sometimes you code - WITH <isolation level> in the SQL Query itself in the COBOL program. Also, you code provide the default lock it can apply while creating the DB2 Objects - Table, TableSpace, I believe, am not sure.
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: What is ROW LOCK & TABLE LOCK and how to implement them?

Post by Anuj Dhawan »

This article provides and intresting read on: Understanding locking in DB2 Universal Database.

Hope this helps.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Vibha
Registered Member
Posts: 31
Joined: Tue Jul 16, 2013 7:35 pm

Re: What is ROW LOCK and TABLE LOCK and how to implement the

Post by Vibha »

Thanks m4mainframe and Anuj.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM DB2 and IMS DB/DC”