2008年3月28日 星期五

Table Last Update Time

Method1 : but no reliability
select ora_rowscn from table
select scn_to_timestamp(ora_rowscn) from table

Method2 : Audit to Monitor
One option is as follows:

(1) Turn the auditing on: AUDIT_TRAIL = true in init.ora

(2) Restart the instance if its running.

(3) Audit the table:

AUDIT INSERT,SELECT,DELETE,UPDATE on TableName
by ACCESS WHENEVER SUCCESSFUL
(4) Get the desired information using :

SELECT OBJ_NAME,ACTION_NAME ,to_char(timestamp,'dd/mm/yyyy , HH:MM:SS')
from sys.dba_audit_object.

沒有留言: