Oracle 死锁的历史?
Oracle 是否保留任何有关死锁的历史记录?
例如,我能否知道检测到死锁时执行了哪些sql,并抛出oracle异常ORA-00060(等待资源时检测到死锁)?
提前致谢。
Does oracle keeps any history about deadlocks?
e.g. Can i know which sqls were executed when the deadlock was detected, and oracle exception ORA-00060 (deadlock detected while waiting for resource) is thrown?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
数据库中没有内置历史记录,但是,当发生死锁时,会发生一些事情。首先,它被记录到alert.log中。其次,写入跟踪文件。所以,那里记录了一些历史。
跟踪文件将包含许多有用的信息,例如:
- 死锁图
- 遇到死锁的SQL
- 死锁中涉及的其他语句
这些信息应该可以帮助您追踪死锁的根源。
如果您有任何具体的案例或示例,请识别跟踪文件,并发布我上面提到的部分,我相信有人将能够帮助您了解发生了什么。
希望有帮助。
There's no history built-in to the database, however, when a deadlock occurs, a couple of things happen. First, it gets logged to the alert.log. Second, a trace file is written. So, there's some history recorded there.
The tracefile will contain many useful bits of information, such as:
- deadlock graph
- SQL that encountered the deadlock
- other statements involved in the deadlock
These pieces of information should help you track down the source of the deadlock.
If you have any specific cases or examples, identify the tracefile, and post the pieces I mentioned above, and I'm sure someone will be able to help you understand what's going on.
Hope that helps.