DDL触发器引起的ORA-06512 (同时兼有ORA-00376)

来源:互联网 发布:淘宝上买东西怎样付款 编辑:程序博客网 时间:2024/05/02 04:42
一.背景说明
2014/10/26, 在家和QQ群里面的兄弟们探讨同一个数据库中有两个相同文件名的数据文件(最终确认是因为文件命里面有空格引起的)的时候对goldengate表空间进行了下线然后添加数据文件的动作(当然是加不上的啦!)。 在对标空间进行上线的时候发现数据库一直报错:
SQL> alter tablespace goldengate online;
alter tablespace goldengate online
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-00376: file 6 cannot be read at this time
ORA-01110: data file 6: '/u02/GOLDENGATE/datafile/o1_mf_goldenga_b34jgzdj_.dbf'
ORA-06512: at line 1072
ORA-00376: file 6 cannot be read at this time
ORA-01110: data file 6: '/u02/GOLDENGATE/datafile/o1_mf_goldenga_b34jgzdj_.dbf'

最终通过查metalink获取到了问题的原因,因为在alert日志里面的报错信息和上面的一样并且ORA-06512报错的说明为:
[oracle@node110 datafile]$ oerr ora 06512
06512, 00000, "at %sline %s"
// *Cause:   Backtrace message as the stack is unwound by unhandled
//           exceptions.
// *Action:  Fix the problem causing the exception or write an exception
//           handler for this condition. Or you may need to contact your
//           application administrator or DBA.

二.问题解决方案
2.1.先说本问题的解决方案
因为本例中,在DDL触发器启动的情况下。表空间上线实际上是DDL操作,它会尝试写内容到goldengate表空间中ddl_marker表,而此时表空间是处于不在线状态的。
MOS文档(ID 1930290.1)说此报错是因为goldengate的DDL触发器引起的,所以先禁用触发器-->上线表空间-->启用触发器
SQL> @ddl_disable;

Trigger altered.

SQL> alter tablespace goldengate online;

Tablespace altered.

SQL>
SQL> @ddl_enable;

Trigger altered.


2.2.metalink文档内容中提到的问题现象
goldengate安装失败之后在数据库中执行DDL都会出现:ORA-01536: space quota exceeded for tablespace 'XXX(应用表空间)'

Disable the Golden Gate trigger, grant "quota unlimited" and also "unlimited tablespace" to the problematic user, in this case its 

as mentioned in the Note 1619714.1   OGG DDL Trigger causes DDL fails: "ORA-01536: space quota exceeded for tablespace 'USERS'"

login as sysdba 

SQL> @ddl_disable.sql 

SQL> alter user ggadmin quota unlimited on users;

SQL> grant unlimited tablespace to ggadmin;

SQL> @ddl_enable.sql


















0 0
原创粉丝点击