第一步,查询锁表信息

Oracle查询锁表以及杀会话或系统进程来解除锁表操作--查询被锁住的数据库对象 Oracle查询锁表以及杀会话或系统进程来解除锁表操作selectobject_name, machine, s.sid, s.serial# Oracle查询锁表以及杀会话或系统进程来解除锁表操作  from v$locked_object l, dba_objects o, v$session s Oracle查询锁表以及杀会话或系统进程来解除锁表操作where l.object_id= o.object_id Oracle查询锁表以及杀会话或系统进程来解除锁表操作   and l.session_id = s.sid;

第二步,杀死数据库会话

Oracle查询锁表以及杀会话或系统进程来解除锁表操作--杀死数据库会话 Oracle查询锁表以及杀会话或系统进程来解除锁表操作alter system kill session '207,707'; -- 207为SID, 707为SERIAL#

第三步,如果第二步无法杀死会话,报ORA-00031,那么只能杀死UNIX/LINUX系统进程了

Oracle查询锁表以及杀会话或系统进程来解除锁表操作--查询当前操作的系统进程ID Oracle查询锁表以及杀会话或系统进程来解除锁表操作select spid, osuser, s.program Oracle查询锁表以及杀会话或系统进程来解除锁表操作  from v$session s, v$process p Oracle查询锁表以及杀会话或系统进程来解除锁表操作where s.paddr = p.addr Oracle查询锁表以及杀会话或系统进程来解除锁表操作   and s.sid =207; -- 207为SID

第四步,根据查询到的系统PID,杀掉进程

Oracle查询锁表以及杀会话或系统进程来解除锁表操作kill-924664// 24664为UNIX/LINUX系统进程ID

相关文章:

  • 2021-08-20
  • 2022-12-23
  • 2021-08-30
  • 2021-11-21
  • 2022-12-23
  • 2022-01-16
  • 2022-12-23
猜你喜欢
  • 2021-11-29
  • 2021-12-21
  • 2021-11-29
  • 2022-02-15
相关资源
相似解决方案