I’ve been tasked with doing some housekeeping on an Oracle schema I have access to. In a nutshell, I’d like to drop any tables that have not been ‘used’ in the last 3 months (tables that haven’t been queried or had data manipulated in the last 3 months). I have read/write access to the schema but I’m not a DBA; I run relatively basic DML/DDL queries in Oracle.
I’m trying to figure out if there’s a way for me to identify old/redundant tables; here’s what I’ve tried (mostly unsuccessfully)
USER_TABLES
was my first port of call, but theLAST_ANALYZED
date in this table doesn’t seem to be the last modified/queried date I’m looking forGoogling has brought
DBA_Hist
tables to my attention, I’ve tried querying some of these (i.e.DBA_HIST_SYSSTAT
) but I’m confronted with (ORA-00942: table or view does not exist
)I’ve also tried querying
V$SESSION_WAIT
,V$ACTIVE_SESSION_HISTORY
andV$SEGMENT_STATISTICS
, but I get the sameORA-00942
error
I’d be grateful for any advice about whether the options above actually offer the sort of information I need about tables, and if so what I can do to work around the errors I’m getting. Alternatively, are there any other options that I could explore?