调试Oracle DDL触发器
无法理解为什么Oracle没有发射任何DDL触发器。
>SELECT * FROM V$VERSION
Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production
STUDENT> CREATE OR REPLACE TRIGGER drop_trigger
BEFORE DROP ON student.SCHEMA
BEGIN
RAISE_APPLICATION_ERROR (
num => -20000,
msg => 'Cannot drop object');
END;
[2022-04-29 11:28:09] completed in 293 ms
STUDENT> create table tbl1 (a integer)
[2022-04-29 11:28:16] completed in 124 ms
STUDENT> drop table tbl1
[2022-04-29 11:28:17] completed in 155 ms
用户和模式 - 两个“学生”;
与DDL-Logging示例完全相同,来自
after ddl on schema
after ddl on student.schema
after ddl on database -- created from name of SYS user
user_errors
或all_errors
没有与问题相关的消息
吗?
Can't understand why Oracle did not fire any DDL trigger.
>SELECT * FROM V$VERSION
Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production
STUDENT> CREATE OR REPLACE TRIGGER drop_trigger
BEFORE DROP ON student.SCHEMA
BEGIN
RAISE_APPLICATION_ERROR (
num => -20000,
msg => 'Cannot drop object');
END;
[2022-04-29 11:28:09] completed in 293 ms
STUDENT> create table tbl1 (a integer)
[2022-04-29 11:28:16] completed in 124 ms
STUDENT> drop table tbl1
[2022-04-29 11:28:17] completed in 155 ms
user and schema - both "Student";
Absolutely the same with DDL-logging example from http://www.dba-oracle.com/sf_ora_04098_trigger_string_string_is_invalid_and_failed_re_validation.htm - no any results for
after ddl on schema
after ddl on student.schema
after ddl on database -- created from name of SYS user
All triggers a visible and shown as ENABLED at all_triggers
.
There no problem-related message at user_errors
or all_errors
Any suggestion?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论