Home » SQL & PL/SQL » SQL & PL/SQL » schema level trigger (Oracle10g,Linux)
schema level trigger [message #407560] Wed, 10 June 2009 08:50 Go to next message
sundarfaq
Messages: 235
Registered: October 2007
Location: Chennai
Senior Member
Hi all,

I have write trigger for audting all ddl operations in schema level triggers. I have handled all information in schema level trigger expect sql statements.

trigger code:

CREATE OR REPLACE TRIGGER audit_i
BEFORE DDL ON SCHEMA
BEGIN
INSERT INTO track_ddl
(HOST,
terminal, sysevent,
login_user, instance_name,
database_name, obj_name, obj_type,
obj_owner
)
VALUES (SYS_CONTEXT ('USERENV', 'HOST'),
SYS_CONTEXT ('USERENV', 'TERMINAL'), ora_sysevent,
SYS_CONTEXT ('USERENV', 'OS_USER'), ora_instance_num,
ora_database_name, ora_dict_obj_name, ora_dict_obj_type,
ora_dict_obj_owner
);
END;
/

now i want to insert the sql statements into track_ddl table.

can u help me

Re: schema level trigger [message #407562 is a reply to message #407560] Wed, 10 June 2009 09:11 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
>now i want to insert the sql statements into track_ddl table.
Please proceed to do so.

You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
Go to the URL above click the link "Posting Guidelines"
Go to the section labeled "Practice" & do as directed.
Re: schema level trigger [message #407573 is a reply to message #407560] Wed, 10 June 2009 10:01 Go to previous message
Michel Cadot
Messages: 64140
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What is the problem?
100+ posts and you don't know how to post!
Read OraFAQ Forum Guide.

Regards
Michel
Previous Topic: counting within cursor loops (merged)
Next Topic: If Statement within Update Trigger (merged 2) 10g
Goto Forum:
  


Current Time: Fri Dec 09 06:00:42 CST 2016

Total time taken to generate the page: 0.09664 seconds