SQL>
SQL>
SQL> CREATE TABLE ddl_creations (
2 user_id VARCHAR2(30),
3 object_type VARCHAR2(20),
4 object_name VARCHAR2(30),
5 object_owner VARCHAR2(30),
6 creation_date DATE);
Table created.
SQL>
SQL> CREATE OR REPLACE TRIGGER LogCreations
2 AFTER CREATE ON DATABASE
3 BEGIN
4 INSERT INTO ddl_creations (user_id, object_type, object_name,
5 object_owner, creation_date)
6 VALUES (USER, SYS.DICTIONARY_OBJ_TYPE, SYS.DICTIONARY_OBJ_NAME,
7 SYS.DICTIONARY_OBJ_OWNER, SYSDATE);
8 END LogCreations;
9 /
Trigger created.
SQL>
SQL> DROP TABLE ddl_creations;
Table dropped.
SQL>
SQL> drop trigger LOGCREATIONS;
Trigger dropped.
SQL>
|