Re: AUD$ TIMESTAMP and LOGOFF_TIME are equal

From: Yong Huang <yong321_at_yahoo.com>
Date: Thu, 31 Dec 2009 22:48:58 -0800 (PST)
Message-ID: <507759.36655.qm_at_web80603.mail.mud.yahoo.com>



> Looks like the behavior has changed with 11g (both R1 and R2 -
> probably a bug!)

You're right. I remembered wrong. I just did a SQL trace. In 10.2.0.4, there's one insert into aud$ at session logon, and one update at logoff as shown below (I omitted irrelevant part but kept all time related info):

At logon:
insert into sys.aud$(...,ntimestamp#, ...) values(...,SYS_EXTRACT_UTC(SYSTIMESTAMP),...)

At logoff :
update sys.aud$ set ..., logoff$time=cast(systimestamp as date), ... where sessionid=:1 and entryid=1 and action#=100

But in 11g (mine is 11.2.0.1), both are inserts:

At logon:
insert into sys.aud$(...,ntimestamp#, ...) values(...,SYS_EXTRACT_UTC(SYSTIMESTAMP),...)

At logoff:
insert into sys.aud$(...,ntimestamp#,..., logoff$time,...) values(...,SYS_EXTRACT_UTC(SYSTIMESTAMP), ...,cast(SYS_EXTRACT_UTC(systimestamp) as date),...)

Due to this change, 11g Oracle no longer needs the index i_aud1 on (sessionid, ses$tid) to speed up the update at session logoff. The overall space usage should be less than doubled for "audit session".

Yong Huang       

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Jan 01 2010 - 00:48:58 CST

Original text of this message