Use this script to find the objects that are locked
To Find the tables that are locked .
SQL>select a.sid,a.serial#,c.object_name
from V$session a, V$locked_object b, user_objects c
where a.sid=b.session_id and b.object_id=c.object_id;
OUTPUT:
--------
SID SERIAL# OBJECT_NAME
---- ------- ------------
7 36 emp
9 58 dept
2 rows selected.
Now to release the lock
SQL>alter system kill session '7,36';
System Altered.
SQL>alter system kill session '9,58';
System Altered.
But before killing the sessions make sure that does not affect your Business.
With Regards
V.Vijay Kaushik
Sunday, May 24, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment