日期:2014-05-16 浏览次数:20403 次
查询数据库执行SQL语句的进程状态,发现执行SQL语句进程死锁,系统显示如下信息:
SQL> select address,sql_text,piece,SECONDS_IN_WAIT,SERVICE_NAME,MACHINE,PROCESS,LOCKWAIT from v$session,v$sqltext where address=sql_address and sql_text like '%FM_%' order by address,piece;
ADDRESS SQL_TEXT SECONDS_IN_WAIT SERVICE_NAME PROCESS LOCKWAIT
-------- ---------------------------------------------------------------- --------------- -----------------------------------------------------------
761BA4D0 DELETE FROM NE5_1.TBL_FM_ALARM_LOG WHERE ROWID IN (SELECT ROWID 7807 omu 22927 AEC028A8
761BA4D0 FROM (SELECT ROWID FROM NE5_1.TBL_FM_ALARM_LOG WHERE 7807 omu 22927 AEC028A8
9AB0B8F8 ress=sql_address and sql_text like '%FM_%' order by address, 0 SYS$USERS 27667
A311D7E4 UPDATE NE5_1.TBL_FM_ALARM_LOG SE 7658 omu 29835 AEC027C0
由以上显示信息可知,22927进程先进入写锁状态,29835进程企图再写锁时陷入无限等待。
已经关闭的应用程序未提交的资源过多,PMON需要大量时间来处理回滚,导致无法处理并释放锁资源。