The DDL_TRIGGER
Namespace
The DDL_TRIGGER
namespace is valid only when a DDL trigger is running.Its use is also valid in stored procedures and functions when called by DDL triggers.
The DDL_TRIGGER
context works like a stack.Before a DDL trigger is fired, the values relative to the executed command are pushed onto this stack.After the trigger finishes, the values are popped.So in the case of cascade DDL statements, when a user DDL command fires a DDL trigger and this trigger executes another DDL command with EXECUTE STATEMENT
, the values of the DDL_TRIGGER
namespace are the ones relative to the command that fired the last DDL trigger on the call stack.
EVENT_TYPE
-
event type (
CREATE
,ALTER
,DROP
) OBJECT_TYPE
-
object type (
TABLE
,VIEW
, etc) DDL_EVENT
-
event name (
<ddl event item>
), where<ddl event item>
isEVENT_TYPE || ' ' || OBJECT_TYPE
OBJECT_NAME
-
metadata object name
OLD_OBJECT_NAME
-
for tracking the renaming of a domain (see note)
NEW_OBJECT_NAME
-
for tracking the renaming of a domain (see note)
SQL_TEXT
-
sql statement text
Note
|
|