Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Lock Problem
Well my answer to "What most likely is the problem" is "Code".
Bad code generates poor locking. Alot of locking problems are code problems.
But, look in v$lock (need to run catblock.sql if you haven't already) and look at the lock types, and objects being locked. Narrow it down to specific objects. Then talk to development if available on those areas.
Are you getting deadlocks or just locks?
Another problem is the time from transaction to commit/rollback is too long. Are ad-hoc dml being run then people going to lunch? Are there procedures that lock entire tables for lengthy times?
But my first thing I would do is look at v$locks and also try this:
SELECT substr(s1.username,1,12)
"WAITING User"
, substr(s1.osuser,1,8)
"OS User"
, substr(to_char(w.session_id),1,5)
"Sid"
, P1.spid
"PID"
, substr(s2.username,1,12)
"HOLDING User"
, substr(s2.osuser,1,8)
"OS User"
, substr(to_char(h.session_id),1,5)
"Sid"
, P2.spid
sys.v_$session S1, sys.v_$session S2, dba_locks w, dba_locks h WHERE h.mode_held != 'None' AND h.mode_held != 'Null' AND w.mode_requested != 'None' AND w.lock_type (+) = h.lock_type AND w.lock_id1 (+) = h.lock_id1 AND w.lock_id2 (+) = h.lock_id2 AND w.session_id = S1.sid (+) AND h.session_id = S2.sid (+) AND S1.paddr = P1.addr (+) AND S2.paddr
"Walking on water and developing software from a specification are easy if
both are frozen."
Christopher R. Spence
Oracle DBA
Fuelspot
-----Original Message-----
Sent: Wednesday, June 06, 2001 2:58 PM
To: Multiple recipients of list ORACLE-L
Hi List,
We have an application running on Oracle database
8.0.5 on NT, this application developed for 1500 users
but after 15 connections every thing is locked, they
asked me to have a look and find out what's the
problem.
If any body have any clue which part must check first
and most likley what sort of problem it is, i really
appreciate.
Thanks in advance.
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: hamid alavi INET: alavi_hamid_at_yahoo.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Christopher Spence INET: cspence_at_FuelSpot.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Wed Jun 06 2001 - 13:53:04 CDT