Oracle 11gR2上遇到blocking txn id for DDL等待事件
2015-03-29 14:44
1191 查看
本文是原创文章,转载请注明出处:/article/1464650.html
在最近处理的一个案例(11.2.0.4版本的oracle db)中,遇到了blocking txn id for DDL 这个等待事件。
下面来说一下当时的操作:
如上建立索引的操作用了17分钟零7秒才完成。
之后我生成该时间段的awr报告,截取top10 等待事件如下:
![](http://img.blog.csdn.net/20150329143251624?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbXNkbmNoaW5h/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)
blocking txn id for DDL 的wait time是1023.1秒 ,17分钟零7秒 =1027秒,也就是说,当时该create index语句的绝大多数时间都在等待。
后来又生成了该时间段的ash报告,在ash报告中,也能清楚的看到 create index操作的等待事件是blocking txn id for DDL,如下:
![](http://img.blog.csdn.net/20150329143608843?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvbXNkbmNoaW5h/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)
在mos文章Alter Table Add Column Command Hangs With Wait Event 'blocking txn id for DDL' (文档 ID 1553725.1)中,清楚的说明了该等待事件:
原文如下:
翻译如下:
DDL命令需要在内部结构上的排他锁。如果这些锁不能获得,DDL命令会失败,并返回"ORA-00054: resource busy" 错误信息。
在Oracle 11.2中,取代了ora-54,alter table语句 不会立即返回错误,而是会无限期的等待。
在11g之前,如果这些锁不能获得,DDL命令会失败,并返回"ORA-00054: resource busy" 错误信息。
在最近处理的一个案例(11.2.0.4版本的oracle db)中,遇到了blocking txn id for DDL 这个等待事件。
下面来说一下当时的操作:
create index idx_tab_1 on table_name (column_name) tablespace xxx online;
如上建立索引的操作用了17分钟零7秒才完成。
之后我生成该时间段的awr报告,截取top10 等待事件如下:
blocking txn id for DDL 的wait time是1023.1秒 ,17分钟零7秒 =1027秒,也就是说,当时该create index语句的绝大多数时间都在等待。
后来又生成了该时间段的ash报告,在ash报告中,也能清楚的看到 create index操作的等待事件是blocking txn id for DDL,如下:
在mos文章Alter Table Add Column Command Hangs With Wait Event 'blocking txn id for DDL' (文档 ID 1553725.1)中,清楚的说明了该等待事件:
原文如下:
DDL commands require exclusive locks on internal structures. If these locks are not available, the commands return with an "ORA-00054: resource busy" error message. On Oracle 11.2 instead of ora-54, the ALTER TABLE statement will not error out immediately. Instead, it waits indefinitely. Prior to 11g, if these locks are not available, the DDL command will fail with an "ORA-00054: resource busy" error message.
翻译如下:
DDL命令需要在内部结构上的排他锁。如果这些锁不能获得,DDL命令会失败,并返回"ORA-00054: resource busy" 错误信息。
在Oracle 11.2中,取代了ora-54,alter table语句 不会立即返回错误,而是会无限期的等待。
在11g之前,如果这些锁不能获得,DDL命令会失败,并返回"ORA-00054: resource busy" 错误信息。
相关文章推荐
- X86_64平台下Oracle 11g R2 X64 for Linux的软件安装、数据库安装、服务配置、数据库启动和停止、SQLPLus使用
- Oracle 11g direct path read 等待事件的理解
- Oracle 11g R2 For RedHat Enterprise Linux 6.3 安装说明书
- ORACLE 11g R2 for SUSE 11集群双机部署
- Oracle 11g R2安装手册(图文教程)For Windows
- Oracle 11g 等待事件
- 关于Oracle中DB time等待事件的特别说明,oracle10个/11g的新特点
- Oracle11g新特性:在线操作功能增强-可等待DDL操作
- Oracle 11g R2 For RedHat Enterprise Linux 5.5 安装说明
- Oracle 11g队列锁等待事件解释
- Centos下安装oracle 11g r2遇到的问题
- Oracle_11g_R2安装详解_for_Windows_7
- Oracle 11g R2安装过程中遇到的报错及解决办法
- Oracle 11g R2安装手册(图文教程)For Windows
- Oracle等待事件KJC:Wait for msg sends to complete
- oracle 11g R2 install for windows
- Oracle 11g r2 for linux(CentOS 6.4) 遇到的两个小问题
- plsql Developer8连接不上oracle 11g for windows server 2008 R2 64位的解决办法
- Oracle 11g R2使用手册For Windows
- Oracle 11g R2安装手册(图文教程)For Windows