Resolving Database Locks

Sometimes it would be really a wise decision to look for the database locks when you see the performance of your program deteriorating. Here are simple steps to verify/resolve locks




sql>Select session_id, object_id from v$locked_object;
--session_id , object_id

sql>Select * from all_objects where object_id in ();

sql>select * from v$session where sid = ;

--sid, serial#

sql>alter system kill session 'sid, serial#';



Deadlocks

Ensure your code is not recursive.Watch your locks so that they dont turn into 'Deadlocks'

No comments:

Post a Comment