简体   繁体   English

重命名时的 Oracle 12C 审计触发器

[英]Oracle 12C Audit Trigger On Rename

I have an audit trigger used for source control where we track all oracle (12c) object modifications.我有一个用于源代码控制的审计触发器,我们可以在其中跟踪所有 oracle (12c) 对象修改。 How can I get the "new" object name within a rename (whether through "alter" or "rename")?如何在重命名中获取“新”对象名称(无论是通过“更改”还是“重命名”)? Regardless if I fire the trigger before or after "ALTER or RENAME or DDL ON DATABASE", I see the "old" name in ORA_DICT_OBJ_NAME.无论我是在“ALTER 或 RENAME 或 DDL ON DATABASE”之前还是之后触发触发器,我都会在 ORA_DICT_OBJ_NAME 中看到“旧”名称。

You can use function ORA_SQL_TXT to catch the triggering statement(via the functions out parameter) and then extract the name of the new object.您可以使用函数ORA_SQL_TXT来捕获触发语句(通过函数输出参数),然后提取新对象的名称。

edit: I replaced ORA_SQL_TEXT with ORA_SQL_TXT;编辑:我用ORA_SQL_TEXT替换了ORA_SQL_TXT;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM