Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / February 2006

Tip: Looking for answers? Try searching our database.

Locks on table.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bikkaran@in.ibm.com - 13 Feb 2006 06:20 GMT
Hi ,

How to find out if  a table is locked ?

Thanks
Bikash
Mark A - 13 Feb 2006 06:35 GMT
> Hi ,
>
> How to find out if  a table is locked ?
>
> Thanks
> Bikash

You can do a snapshot for locks (you must turn on the lock monitor first).
See the "Command Reference" manual.

Table level locking occurs in the following ways:

- Table is created with table level locking (instead of row level). See "SQL
Reference Vol 2".
- Lock Table SQL statement as described in "SQL Reference Vol 2".
- Lock escalation from row to table (this will show up in the db2diag.log).
Lock escalation is be influenced by the LOCKLIST and MAXLOCKS database
configuration parameters as described in the "Administration: Performance"
manual.
bikkaran@in.ibm.com - 13 Feb 2006 06:54 GMT
Hi Mark,

I think  as a normal database user  I dont have the privilege  to use
"get snapshot "  command .
I dont have any admin rights on the database.
In this case as a  developer point of view , how will I b able to find
out.
Thanks

bikash
Mark A - 13 Feb 2006 08:50 GMT
> Hi Mark,
>
[quoted text clipped - 6 lines]
>
> bikash

SOL
Serge Rielau - 13 Feb 2006 12:51 GMT
> Hi Mark,
>
[quoted text clipped - 4 lines]
> out.
> Thanks
The privilege required is SYSMON.
You can do so empirical testing by trying to read soem rows with in
NOWAIT mode.

Cheers
Serge
Signature

Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

hikums@gmail.com - 13 Feb 2006 18:05 GMT
Try doing, db2 list applications show detail..
applications in lock_waiting are the ones waiting on it..one of the
ones in the executing state may be the one holding lock..

without having admin privilege, you may not have much luck.
with admin:
you can do
get snapshot for applications to see which app is holding lock, and
which is waiting on it.

> > Hi Mark,
> >
[quoted text clipped - 10 lines]
> Cheers
> Serge
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.