對table的操作進行監控

oracle_ace發表於2007-12-14

SQL> create table t(id int);

Table created

SQL> select * from user_tab_modifications;

TABLE_NAME                     PARTITION_NAME                 SUBPARTITION_NAME                 INSERTS    UPDATES    DELETES TIMESTAMP   TRUNCATED
------------------------------ ------------------------------ ------------------------------ ---------- ---------- ---------- ----------- ---------

SQL> alter table t monitoring;

Table altered

SQL> insert into t values(1);

1 row inserted

SQL> update t set id=1;

1 row updated

SQL> select * from user_tab_modifications;

TABLE_NAME                     PARTITION_NAME                 SUBPARTITION_NAME                 INSERTS    UPDATES    DELETES TIMESTAMP   TRUNCATED
------------------------------ ------------------------------ ------------------------------ ---------- ---------- ---------- ----------- ---------

SQL> exec DBMS_STATS.FLUSH_DATABASE_MONITORING_INFO

PL/SQL procedure successfully completed

SQL> select * from user_tab_modifications;

TABLE_NAME                     PARTITION_NAME                 SUBPARTITION_NAME                 INSERTS    UPDATES    DELETES TIMESTAMP   TRUNCATED
------------------------------ ------------------------------ ------------------------------ ---------- ---------- ---------- ----------- ---------
T                                                                                                     1          1          0

All the process will be freshed after 20 minutes

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12361284/viewspace-590/,如需轉載,請註明出處,否則將追究法律責任。

相關文章