时间:2021-08-18 08:16:40 | 栏目:Oracle | 点击:次
查询锁表
select object_name,machine,s.sid,s.serial# from v$locked_object l,dba_objects o ,v$session s where l.object_id = o.object_id and l.session_id=s.sid ;
杀表(程序内杀)
alter system kill session '543,9206';
如果杀不掉可以查这个来获取spid(将获取的spid给有权限的网络管理员,他就给你杀了。这个属于程序外杀,杀完这个PL/SQL就要重新登录了)
select a.spid,b.sid,b.serial#,b.username from v$process a,v$session b where a.addr=b.paddr and b.status='KILLED';
查询sid的spid验证上面查询是否正确
select b.spid,a.osuser,b.program from v$session a,v$process b where a.paddr=b.addr and a.sid=543