官网对oracle deadlock的说明
http://docs.oracle.com/cd/E11882_01/server.112/e40540/consist.htm#CNCPT1339
关于oracle lock介绍,参考下面的链接
http://blog.itpub.net/28697282/viewspace-1484385/
什么是deadlock
官方给出的说法是
A deadlock is a situation in which two or more users are waiting for data locked by each other. Deadlocks prevent some transactions from continuing to work.
死锁是两个或者多个用户等待被对方锁定的数据的情况。也就是说两个或者多个用户互相等待对方所占有的资源的情况。
deadlock的形成
deadlock的检测
Oracle Database automatically detects deadlocks and resolves them by rolling back one statement involved in the deadlock, releasing one set of the conflicting row locks. The database returns a corresponding message to the transaction that undergoes statement-level rollback. The statement rolled back belongs to the transaction that detects the deadlock. Usually, the signalled transaction should be rolled back explicitly, but it can retry the rolled-back statement after waiting.
oracle 自动检测并解决deadlock,通过回滚deadlock中相关的
与deadlock相关的进程(11g)
与oracle deadlock相关的进程官网说明
http://docs.oracle.com/cd/E11882_01/server.112/e40402/bgprocesses.htm#REFRN104
下面是11g特有的检测死锁的两个进程
dia0,lmd0
Name
|
Expanded Name
|
Short Description
|
Long Description
|
External Properties
|
DIA0
|
Diagnostic Process
|
Detects and resolves hangs and deadlocks
|
|
ASM and Database instances
|
LMD0
|
Global Enqueue Service Daemon 0 Process
|
Manages incoming remote resource requests from other instances
|
LMD0 processes enqueue resources managed under Global Enqueue Service. In particular, LMD0 processes incoming enqueue request messages and controls access to global enqueues. It also performs distributed deadlock detections.
|
Database and ASM instances, Oracle RAC
|
deadlock模拟
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/28697282/viewspace-1521139/
,如需转载,请注明出处,否则将追究法律责任。