Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Creating DDL level triggers in Oracle 8.1.7
look in application developers guide or plsql user's guide for more info
I've succesfully created for testing purposes them as follows
create or replace trigger ON_ALTER
AFTER ALTER ON DATABASE
BEGIN
INSERT INTO sys_aud_table (
event
,id
,timestamp
,login_user
,object_type
,object_name
,object_owner
,encr_passwd
) VALUES (
ora_sysevent
,sys_aud_table_seq.nextval
,sysdate
,ora_login_user
,ora_dict_obj_type
,ora_dict_obj_name
,ora_dict_obj_owner
,ora_des_encrypted_password
create or replace trigger on_create
AFTER CREATE ON DATABASE
BEGIN
INSERT INTO sys_aud_table (
event
,id
,timestamp
,login_user
,object_type
,object_name
,object_owner
) VALUES (
ora_sysevent
,sys_aud_table_seq.nextval
,sysdate
,ora_login_user
,ora_dict_obj_type
,ora_dict_obj_name
,ora_dict_obj_owner
create or replace trigger on_drop
AFTER DROP ON DATABASE
BEGIN
INSERT INTO sys_aud_table (
event
,id
,timestamp
,login_user
,object_type
,object_name
,object_owner
) VALUES (
ora_sysevent
,sys_aud_table_seq.nextval
,sysdate
,ora_login_user
,ora_dict_obj_type
,ora_dict_obj_name
,ora_dict_obj_owner
create or replace trigger on_logoff
BEFORE LOGOFF ON DATABASE
BEGIN
INSERT INTO sys_aud_table (
event
,id
,timestamp
,login_user
) VALUES (
ora_sysevent
,sys_aud_table_seq.nextval
,sysdate
,ora_login_user
create or replace trigger on_logon
AFTER LOGON ON DATABASE
BEGIN
INSERT INTO sys_aud_table (
event
,id
,timestamp
,login_user
,ip_address
) VALUES (
ora_sysevent
,sys_aud_table_seq.nextval
,sysdate
,ora_login_user
,ora_client_ip_address
SQL> desc sys_aud_table
Name Null? Type ------------------------------- -------- ---- ID NUMBER(38) TIMESTAMP DATE EVENT VARCHAR2(100) LOGIN_USER VARCHAR2(100) IP_ADDRESS VARCHAR2(100) OBJECT_TYPE VARCHAR2(100) OBJECT_NAME VARCHAR2(100) OBJECT_OWNER VARCHAR2(100) ENCR_PASSWD VARCHAR2(100) ALTER_COLS VARCHAR2(100) DROP_COLS VARCHAR2(100) GRANTEE VARCHAR2(100) WITH_GRANT_OPTION VARCHAR2(100) PRIVS VARCHAR2(100)
Gints Plivna
Arslan Dar <arslandar_at_sk To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> m.org.pk> cc: Sent by: Subject: Creating DDL level triggers in Oracle 8.1.7 root_at_fatcity. com 2001.07.31 11:45 Please respond to ORACLE-L
hi list,
Oracle 8.1.7
It supports DDL level triggers but i cannot find the proper syntax for
writing such triggers not even in OEM (DBA STUDIO or Schema Manager) ..can
anybody guide me to a link or a sample trigger set on DDL (like create any
table).....
thanks in advance
Arslan
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: INET: G.Plivna_at_itsystems.lv Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Wed Aug 01 2001 - 03:04:01 CDT
![]() |
![]() |