![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm using a trigger like so: CREATE OR REPLACE TRIGGER TRG_SCHEMA_CHANGES AFTER DDL ON "MYSCHEMA".SCHEMA To capture all schema changes to a table I made. I use these variables to capture some pertinent data: ora_login_user; ora_sysevent; ora_dict_obj_type; ora_dict_obj_owner; ora_dict_obj_name; I put the above into fields of the table I made. Seems to work fine. What I would like to know is, how do I capture the ddl statement itself? I'd like to put the DDL statement itself that fired the trigger into a clob/blob field. |
#3
| |||
| |||
|
|
I'm using a trigger like so: CREATE OR REPLACE TRIGGER TRG_SCHEMA_CHANGES AFTER DDL ON "MYSCHEMA".SCHEMA To capture all schema changes to a table I made. I use these variables to capture some pertinent data: ora_login_user; ora_sysevent; ora_dict_obj_type; ora_dict_obj_owner; ora_dict_obj_name; I put the above into fields of the table I made. Seems to work fine. What I would like to know is, how do I capture the ddl statement itself? I'd like to put the DDL statement itself that fired the trigger into a clob/blob field. |
#4
| |||
| |||
|
|
I'm using a trigger like so: CREATE OR REPLACE TRIGGER TRG_SCHEMA_CHANGES AFTER DDL ON "MYSCHEMA".SCHEMA To capture all schema changes to a table I made. I use these variables to capture some pertinent data: ora_login_user; ora_sysevent; ora_dict_obj_type; ora_dict_obj_owner; ora_dict_obj_name; I put the above into fields of the table I made. Seems to work fine. What I would like to know is, how do I capture the ddl statement itself? I'd like to put the DDL statement itself that fired the trigger into a clob/blob field. |
#5
| |||
| |||
|
|
I'm using a trigger like so: CREATE OR REPLACE TRIGGER TRG_SCHEMA_CHANGES AFTER DDL ON "MYSCHEMA".SCHEMA To capture all schema changes to a table I made. I use these variables to capture some pertinent data: ora_login_user; ora_sysevent; ora_dict_obj_type; ora_dict_obj_owner; ora_dict_obj_name; I put the above into fields of the table I made. Seems to work fine. What I would like to know is, how do I capture the ddl statement itself? I'd like to put the DDL statement itself that fired the trigger into a clob/blob field. |
#6
| |||
| |||
|
|
I'm using a trigger like so: CREATE OR REPLACE TRIGGER TRG_SCHEMA_CHANGES AFTER DDL ON "MYSCHEMA".SCHEMA To capture all schema changes to a table I made. I use these variables to capture some pertinent data: ora_login_user; ora_sysevent; ora_dict_obj_type; ora_dict_obj_owner; ora_dict_obj_name; I put the above into fields of the table I made. Seems to work fine. What I would like to know is, how do I capture the ddl statement itself? I'd like to put the DDL statement itself that fired the trigger into a clob/blob field. |
#7
| |||
| |||
|
|
I'm using a trigger like so: CREATE OR REPLACE TRIGGER TRG_SCHEMA_CHANGES AFTER DDL ON "MYSCHEMA".SCHEMA To capture all schema changes to a table I made. I use these variables to capture some pertinent data: ora_login_user; ora_sysevent; ora_dict_obj_type; ora_dict_obj_owner; ora_dict_obj_name; I put the above into fields of the table I made. Seems to work fine. What I would like to know is, how do I capture the ddl statement itself? I'd like to put the DDL statement itself that fired the trigger into a clob/blob field. |
#8
| |||
| |||
|
|
I'm using a trigger like so: CREATE OR REPLACE TRIGGER TRG_SCHEMA_CHANGES AFTER DDL ON "MYSCHEMA".SCHEMA To capture all schema changes to a table I made. I use these variables to capture some pertinent data: ora_login_user; ora_sysevent; ora_dict_obj_type; ora_dict_obj_owner; ora_dict_obj_name; I put the above into fields of the table I made. Seems to work fine. What I would like to know is, how do I capture the ddl statement itself? I'd like to put the DDL statement itself that fired the trigger into a clob/blob field. |
#9
| |||
| |||
|
|
I'm using a trigger like so: CREATE OR REPLACE TRIGGER TRG_SCHEMA_CHANGES AFTER DDL ON "MYSCHEMA".SCHEMA To capture all schema changes to a table I made. I use these variables to capture some pertinent data: ora_login_user; ora_sysevent; ora_dict_obj_type; ora_dict_obj_owner; ora_dict_obj_name; I put the above into fields of the table I made. Seems to work fine. What I would like to know is, how do I capture the ddl statement itself? I'd like to put the DDL statement itself that fired the trigger into a clob/blob field. |
#10
| |||
| |||
|
|
Have you looked athttp://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_... in particular on ora_sql_txt ? |
![]() |
| Thread Tools | |
| Display Modes | |
| |