Monitoring DML Table Changes
From Sys:
SQL> grant analyze any to siam; [For granting exec dbms_stats.flush_database_monitoring_info to other user]
SQL>conn siam/siam;
SQL> create table mon(a number,b varchar2(100));
SQL> select monitoring from user_tables where table_name='MON';
In 10g table automatically has monitor option enabled.
For 9i you should execute the following:
SQL> alter table mon monitoring;
SQL> insert into mon values(1,'a');
SQL> insert into mon values(2,'b');
SQL> insert into mon values(3,'c');
SQL> commit;
SQL> select * from user_tab_modifications where table_name='MON';
SQL> exec dbms_stats.flush_database_monitoring_info;
SQL> select * from user_tab_modifications where table_name='MON';
SQL> delete from mon where a=3;
SQL> select * from user_tab_modifications where table_name='MON';
SQL> exec dbms_stats.flush_database_monitoring_info;