Page 1 of 1

Level of Locking on a specific table

PostPosted: Mon Jan 03, 2011 8:05 pm
by kk12345
Dear Experts,

I read in the DB2 book that there are row level locking and table level locking exists.
And a developer or admin can also change the level of locking using the
ALTER TABLE [Table-Name] LOCKSIZE [ ROW / TABLE ]
LOCK TABLE [TABLE-NAME] IN [ SHARE / EXCLUSIVE ] MODE
above commands.

I would like to know the existing level of locking ( ROW / TABLE ] for tables in my application. Please let me know which system catalog table I need to query for ??

Re: Level of Locking on a specific table

PostPosted: Tue Jan 04, 2011 4:39 pm
by GuyC
LOCKRULE in SYSIBM.SYSTABLESPACE

select tb.creator , tb.name, tb.dbname, tb.tsname, ts.lockrule
from sysibm.systables tb
join sysibm.systablespace ts on tb.dbname = ts.dbname and tb.tsname = ts.name
where tb.creator = 'xxxx' and tb.name = 'xxxxx'

Re: Level of Locking on a specific table

PostPosted: Thu Jan 06, 2011 8:18 pm
by kk12345
thanks GuyC. I understand about Lockrule.

I have posted few other Questions in DB2. please help me by answering them.

thanks in advance.