STEP 1: get the SID for the table which have lock.
select
session_id
from
dba_dml_locks
where
name = 'table';
output
SID
----
450
STEP 2: find the Serial# for the table row lock :
select
sid,
serial#
from
v$session
where
sid in (
select
session_id
from
dba_dml_locks
where
name = 'table');
Output :
SID SERIAL#
---- -------
450 18341
STEP 3: Finally "alter system" command to kill the session that is holding the table lock:
alter system kill session 'SID,SERIALl#';
alter system kill session '450,18341'
No comments:
Post a Comment