| DBAToolZ - Scripts ( Locks ) | ![]() |
| (Last updated 05/21/2003) | |
| Home     Download     Forums     SQL Scripts     Book Review     Links     Feedback |
| Script Name | Description |
|---|---|
Displays DECODEd locking information (WARNING: slow) | |
*** QUICK *** Reports the following: - object locks from V$LOCKED_OBJECT using PL/SQL loops since join of DBA_OBJECTS and V$LOCKED_OBJECT is extremly slow - blocked objects from V$LOCK and SYS.OBJ$ - blocked sessions from V$LOCK | |
Reports library cache locks. Many times in heavy development environment PL/SQL code get`s compiled while someone else is using it. This creates locks in library cache which can be very hard to trace. I would typically check v$session_wait to see if there are any waits for "enque", most of the time it`s library cache lock especially when other locks are not present. -- The next step would be to find out which package waiting session was trying to compile or execute and run this script supplying this package name. When you get the output of this script you can kill sessions that are causing library cache lock. | |
This script reports sessions that are currently waiting
output DECODED locking information from v$lock and v$sessions
| |
This script reports details from v$session_wait where wait_time = 0 and seconds_in_wait > |
| DBAToolZ Home | Contact Us |
| Copyright© 2001 DBAToolZ.com All Rights Reserved. |