Sunday, 20 January 2013

finding last dml on tables in Oracle

There is a way to find the last dml time :-

Alter Table Tabname Monitoring;

Once this is there, Select * from User_Tab_Modifications;

If you want all tables to be Checked, Run the script like this
Spool Monitor.sql
Select 'Alter table '||Table_Name||' Monitoring ;' From User_Tables;
Spool Off;

select to_char(scn_to_timestamp(max(ora_rowscn))) from <table_name>;

 select * from all_tab_modifications where table_name = '<table_name>';

No comments:

Post a Comment