Oracle数据库表被锁,进行解锁处理。
#1 使用管理员(sys_dba)登录服务器
SQL> select object_id, locked_mode from v$locked_object;
#2 查看被锁的表名称,查看视图:dba_objects
SQL> select object_name from dba_objects where object_id = 220270;
#3 查出锁表的相关ID
SQL> select object_name, machine , s.sid, s.serial# from gv$locked_object l, dba_objects o, gv$session s where l.object_id = o.object_id and l.session_id = s.sid;
#4 根据步骤1中查出的id,进行kill,即可解锁。
// SQL> alter system kill session 'sid, serial#';
SQL> alter system kill session '96, 10966';