Oracle puts locks
while performing any DDL or DML operation on oracle tables.When table locks is
present on any tables in Oracle we cannot run DDL on those tables.
Some of the locks
automatically set by oracle are RS and RX Locks.
SELECT … FOR UPDATE
execution results in RS (row share) table lock. When you execute an INSERT,
UPDATE or DELETE Oracle puts RX (row exclusive) table lock.
We have to kill the
session which holds the lock in order to execute further operations. Follow the
below steps to kill the session and forcibly unlock the table.
Let’s assume that
'EMP' table is locked,