Oracle解决锁表问题

步骤:
1.查看被锁的表
Select b.owner,b.object_name,a.session_id,a.locked_mode
From v$locked_object a,dba_objects b
Where b.object_id = a.object_id;

2.查看那个用户那个进程照成死锁
Select b.username,b.sid,b.serial#,logon_time
From v l o c k e d o b j e c t a , v locked_object a,v lockedobjecta,vsession b
Where a.session_id = b.sid order by b.logon_time;

3.杀掉进程(关键操作)
Alter system kill session’210,11562’; //参数为sid,serial#

你可能感兴趣的:(数据库)