Oracle 12C Audit Trigger On Rename

341 Views Asked by At

I have an audit trigger used for source control where we track all oracle (12c) object modifications. 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.

1

There are 1 best solutions below

1
ivanzg On

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.

edit: I replaced ORA_SQL_TEXT with ORA_SQL_TXT;