问题描述
当我在生产数据库中使用新版本重新编译触发器时,下面显示的错误。但是,我可以在测试数据库中成功重新编译相同的触发器 (生产数据库和测试数据库都在版本12.2.0.1.0中)。
Error report -
ORA-00604: error occurred at recursive SQL level 1
ORA-01405: fetched column value is NULL
00604. 00000 - "error occurred at recursive SQL level %s"
*Cause: An error occurred while processing a recursive SQL statement
(a statement applying to internal dictionary tables).
*Action: If the situation described in the next error on the stack
can be corrected, do so; otherwise contact Oracle Support.
我在Oracle支持页面上看到了一个声明,但我无法验证是否删除并再次编译触发器的工作原理,因为我无法在测试数据库中复制此错误 (我担心删除现有触发器,但仍然无法编译生产数据库中的新触发器):
The following "CREATE OR REPLACE TRIGGER" statement on an existing trigger fails with "ORA-01405" after application of Database Oct 2018 Release Update 12.2.0.1.181016().
The trigger compilation goes successful if the trigger is dropped first and then compiled again with the same "CREATE OR REPLACE TRIGGER" statement.
我的触发器代码的开始如下:
为什么生产数据库中的触发器重新编译会引发此错误,但在测试数据库中成功?
如何在测试数据库中复制此错误,以便可以测试该建议?
Error report -
ORA-00604: error occurred at recursive SQL level 1
ORA-01405: fetched column value is NULL
00604. 00000 - "error occurred at recursive SQL level %s"
*Cause: An error occurred while processing a recursive SQL statement
(a statement applying to internal dictionary tables).
*Action: If the situation described in the next error on the stack
can be corrected, do so; otherwise contact Oracle Support.
我在Oracle支持页面上看到了一个声明,但我无法验证是否删除并再次编译触发器的工作原理,因为我无法在测试数据库中复制此错误 (我担心删除现有触发器,但仍然无法编译生产数据库中的新触发器):
The following "CREATE OR REPLACE TRIGGER" statement on an existing trigger fails with "ORA-01405" after application of Database Oct 2018 Release Update 12.2.0.1.181016(
The trigger compilation goes successful if the trigger is dropped first and then compiled again with the same "CREATE OR REPLACE TRIGGER" statement.
我的触发器代码的开始如下:
CREATE OR REPLACE TRIGGER INSERT_TABLE_TR BEFORE INSERT ON table1 REFERENCING OLD AS old NEW AS new FOR EACH ROW ...
为什么生产数据库中的触发器重新编译会引发此错误,但在测试数据库中成功?
如何在测试数据库中复制此错误,以便可以测试该建议?
专家解答
鉴于这是一个错误,它不太可能在发生时可以控制,但也许可以尝试这种方法来控制生产中的事情:
它在生产中创建触发器的新版本 (即,新名称),但它被禁用-这将检查编译工作没有问题。
那你可以做
CREATE OR REPLACE TRIGGER INSERT_TABLE_TR_NEW_NAME ... ... DISABLE;
它在生产中创建触发器的新版本 (即,新名称),但它被禁用-这将检查编译工作没有问题。
那你可以做
drop trigger INSERT_TABLE_TR alter trigger INSERT_TABLE_TR_NEW_NAME enable;
文章转载自ASKTOM,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




