Step By Step Remove Oracle Table Lock

All your query should be done using sys user or system user, after that you need to find Session SID with below query :

SQL> SELECT SESSION_ID
  2  FROM DBA_DML_LOCKS
  3  WHERE NAME = ‘EMP_INFORMATION’;

Where EMP_INFORMATION is Table_name

Output :

SID
___
424

Next step it’s talking about How to find Serial# :

SELECT SID,SERIAL#
FROM V$SESSION
WHERE SID IN (SELECT SESSION_ID
FROM DBA_DML_LOCKS
WHERE NAME = ‘EMP_INFORMATION’)

Output :

SID                SERIAL#
—-                 ——-
424                 1103

Use Alter system To kill this session :
ALTER SYSTEM KILL SESSION ‘SID,SERIALl#’;

Thank you
Osama mustafa


2 thoughts on “Step By Step Remove Oracle Table Lock

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.