473,325 Members | 2,308 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Locks on table.

Hi ,

How to find out if a table is locked ?

Thanks
Bikash

Feb 13 '06 #1
5 1500
<bi******@in.ibm.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
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.
Feb 13 '06 #2
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

Feb 13 '06 #3
<bi******@in.ibm.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
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


SOL
Feb 13 '06 #4
bi******@in.ibm.com wrote:
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

The privilege required is SYSMON.
You can do so empirical testing by trying to read soem rows with in
NOWAIT mode.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Feb 13 '06 #5
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.

Serge Rielau wrote:
bi******@in.ibm.com wrote:
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

The privilege required is SYSMON.
You can do so empirical testing by trying to read soem rows with in
NOWAIT mode.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab


Feb 13 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: rkusenet | last post by:
I am fairly new to SQL Server. I am writing a tool in stored procedure to identify locks in a table. I have already written the basic framework of the SP. It will reside in master database and take...
17
by: Dr NoName | last post by:
Help! I have a table that multiple processes must be able to write to concurrently. However, it for some reason gets locked in exclusive mode. I narrowed it down to one SQL statement + some...
11
by: EoRaptor | last post by:
I`m exporting data from many Lotus Notes databases to a DB2 database using LotusScript. The LotusScript agents commit after EACH update/insert. Nevertheless, I keep getting transaction rollbacks on...
10
by: florian | last post by:
Hi, we have a contention problem because of an application which tries to insert a duplicate row in a table with primary key. This insert fails of course but the locks are not released within...
6
by: John Carroll | last post by:
Is there a SQL query that can be run against a database that will give me all the details on any locks that are in place at the given time? I am interested in find the lock type and owner. Thank...
0
by: Bruce Pullen | last post by:
DB2 v7.2 (FP7 - DB2 v7.1.0.68) on AIX 5.2.0.0. We're seeing unexpected single row (then commit) insert locking behaviour. We're seeing Applications that already hold row-level W locks in...
22
by: RayPower | last post by:
I'm having problem with using DAO recordset to append record into a table and subsequent code to update other tables in a transaction. The MDB is Access 2000 with the latest service pack of JET 4....
1
by: shenanwei | last post by:
I have db2 v8.2.5 on AIX V5.3 with all the switches on Buffer pool (DFT_MON_BUFPOOL) = ON Lock (DFT_MON_LOCK) = ON Sort ...
7
by: praveen | last post by:
Hi When does DB2 go for an IS (Intent Share) lock? IS mode is defined as a mode in which "The lock owner can read data in the locked table, but cannot update this data. Other applications can...
6
by: jsacrey | last post by:
Hello everybody, I've got a bit of a situation that I could use some guidance with if possible. I work for an auditing firm where my users audit electronic shipping data for customers to see if...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.