Sunday, April 29, 2012

Queries To Find & Release Locks At Object Level

Search Locks For the Object
Step :1) SELECT  session_id 
             FROM     dba_ddl_locks
             WHERE  name = '<object_name_here>';

Look For the SID and SERIAL# Combination For The Corresponding SESSION_ID
Step :2) SELECT  sid,serial# 
             FROM     v$session 
             WHERE  sid = '<session_id>';

Query To Kill DB Session
Step :3) alter system kill session '<sid>,<serial#>';

No comments:

Post a Comment