首先

  truncate table *;

报错:

ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired

查看当前锁住的sid:

select l.session_id,o.owner,o.object_name from v$locked_object l,dba_objects o where l.object_id=o.object_id;

根据session_id查看serial#

SELECT sid, serial#, username, oSUSEr, terminal,program ,action, prev_exec_start FROM v$session where sid = 619;

杀掉占用资源: alter system kill session 'sid,serial#';

alter system kill session '619,29746';

如果出现了 ORA-00030: User session ID does not exist

那么需要通过sid查看系统进程号psid

select spid, osuser, s.program from v$session s, v$process p
where s.paddr = p.addr and s.sid =619;

在oracle所在的服务器查看psid

ps -ef | grep 23421

oracle      23421   1  0 Dec21 ?        00:00:00 oracle10g (LOCAL=NO)   

这样的local=no就是可以杀掉的,如果进程中有local=yes

执行kill命令

kill -9 23421

 

相关文章:

  • 2022-12-23
  • 2021-08-20
  • 2022-12-23
  • 2021-07-17
  • 2021-08-11
  • 2021-04-07
猜你喜欢
  • 2021-06-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2021-06-22
相关资源
相似解决方案