首页 > 数据库 > Oracle > 正文

如何查到oracle dml lock和如何解决

2024-08-29 13:38:16
字体:
来源:转载
供稿:网友

  检查dml lock的脚本:dmllocks.sql
  Doc
  
  Name:     dmllocks.sql
  Author:    Jassie
  Description: This script shows current dml locks on the system
  
  #
  
  select session_id, owner,name,MODE_HELD
  from sys.dba_dml_locks;
  
  查到了session_id,把他kill掉就行了,一下的脚本会执行这个:killses.sql
  
  Doc
  
  Name:    killses.sql
  Author:   James Xie
  Purpose:   To kill a session easily by its session id
  
  #
  
  col col1 new_value serialno
  select SERIAL# col1 from v$session
  where sid=&1
  /
  alter system kill session '&1, &serialno'
  /
  undefine 1
  
  根据提示输入session_id

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表