OERR: ORA 60 "deadlock detected while waiting for resource" [ID 18251.1](oracle deadlock 学习资料-03 死锁分析步骤)

本文详细解析了Oracle数据库中ORA-60错误,该错误通常由于事务间的资源竞争导致死锁而引发。文章提供了诊断步骤及解决建议,包括检查锁定类型、模式和涉及的事务,并给出了几种常见场景及其可能的原因。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Error:  ORA 60

Text: deadlock detected while waiting for resource

-------------------------------------------------------------------------------

Cause: Transactions deadlock one another waiting for resources

Action: Look at the trace file to see the transactions and resources

involved. Retry if necessary.



*** Important: The notes below are for experienced users - See Note:22080.1




** For CUSTOMER issues with ORA-60 send them: Note:62365.1


This details the most common ORA-60 scenarios.



Explanation:

A deadlock has been detected so your statement has been rolled

back to allow the other party to continue.



Diagnosis:

Note the lock TYPES and MODES in the DEADLOCK graph.

The most common deadlocks involve one of the following:

Lock type Mode Problem

TX X Application row lock deadlock.See below.

TX S Many reasons - see Note:62354.1


TM SSX Usually unindex foreign key constraints.





TX requested X mode:

~~~~~~~~~~~~~~~~~~~~~

This is usually an application design issue in that transactions

are modifying tables A and B in opposite orders.

Eg: 1 updates A

2 updates B

1 tries to update B but blocks

2 tries to update A but blocks

** Deadlock as neither 1 nor 2 will ever complete.



a) Has ANYTHING in the schema been changed (Eg: A foreign key INDEX

may have been dropped) as this could affect locking of tables.



b) There should be a user trace with the deadlock TX information

in USER_DUMP_DEST. This will indicate who was involved in the

deadlock



c) Is the insert into a clustered table ? If so see Bug:197942




d) What are MAXTRANS / INITRANS for the tables in the deadlock ?





Articles / Known Issues:

ORA-60 against UET$ (Fixed 7.2) Bug:231455


ORA-60 from ANALYZE ... VALIDATE ... command:

NOTE: It is possible to get this if the dictionary has

been analyzed and has statistics present. Delete

the statistics.



V6: If this occurs on startup it is likely that a file may be missing.

There should be a trace file produced and an entry in the alert log

which will tell you the location of the problem file. Either:

a) restore access to the datafiles

OR b) offline the datafiles and drop the tablespace when it

opens to clean up the data dictionary.

(obviously you have lost all the data in this case)





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值