Methods for capturing data variations in Oracle databases

Source: Internet
Author: User

Oracle 10 Gb provides two activation methods, one for users and the other for tables.

Implementation Method for users:

  1. DBMS_STATS.ALTER_SCHEMA_TABLE_MONITORING (
  2. Ownname VARCHAR2DEFAULT NULL,
  3. Monitoring BOOLEANDEFAULT TRUE);

How to implement a single table (set the MONITORING attribute of the table)

Alter Table<Table_name> (MONITORING/NOMONITORING)

Query the table data change results

Select*FromUser_tab_modifications;

The above information can be used to clearly calculate the data changes of a table within a certain period of time. (It is more accurate to test how many records have been added, deleted, and modified for each monitor table)

If the user_tab_modifications view is not updated, after DML is executed, 9i can force update by executing the following statement. The default value is automatically updated every 15 minutes.

Exec dbms_stats.FLUSH_DATABASE_MONITORING_INFO ();

In 10g, if the initialization parameter statistics_level is TYPICAL or ALL, the table is automatically monitored.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.