Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: system trigger question
epipko_at_gmail.com wrote:
> create or replace trigger logon_audit_trigger
> AFTER LOGON ON DATABASE
> BEGIN
> insert into stats$user_log
> values(user,
> sys_context('USERENV','SESSIONID'),
> sys_context('USERENV','HOST'),
> null,
> null,
> null,
> sysdate,
> to_char(sysdate, 'hh24:mi:ss'),
> null,
> null,
> null);
And as an additional point to the good advice from fitzjarrell you really should name your columns in hyour insert statement. Add a column to stats$user_log and everything breaks.
-- Daniel A. Morgan http://www.psoug.org damorgan_at_x.washington.edu (replace x with u to respond)Received on Wed Apr 19 2006 - 11:10:34 CDT