how to identify when the database is last accessed/modified
How to identify whether the database is last accessed or modified so based that the database can be de-comissioned to reclaim storage.
At present we have identified the below queries for 10g & 11g but not able to find for 9i versions.
Last_user_execution -> select max(sample_time) from DBA_HIST_ACTIVE_SESS_HISTORY where session_type='FOREGROUND';
Last_user_modification -> select max (TIMESTAMP) from ALL_TAB_MODIFICATIONS where table_owner NOT IN ('SYS', 'SYSTEM', 'SYSMAN', 'OUTLN', 'DBSNMP') ;Is this the right approach to capture the information. Auditing at the database level is not enabled and client doesn't want any logon/logoff triggers to implemented for the requirement.