Oracle Database Maintenance Operations 2

Source: Internet
Author: User

--Analysis TableDbms_stats.gather_table_stats--stored procedures for statistical tables(Ownnamevarchar2, TabNamevarchar2, PartNamevarchar2 default NULL, Estimate_percent Number defaultTo_estimate_percent_type (Get_param ('estimate_percent')), Block_sample Booleandefaultfalse, Method_optvarchar2 defaultGet_param ('method_opt'), Degree Number defaultTo_degree_type (Get_param ('degree')), granularityvarchar2 defaultGet_param ('Granularity'),    CascadeBooleandefaultTo_cascade_type (Get_param ('Cascade')), Stattabvarchar2 default NULL, Statidvarchar2 default NULL, Statownvarchar2 default NULL, No_invalidate booleandefaultTo_no_invalidate_type (Get_param ('no_invalidate')), StatTypevarchar2 default 'Data', Force Booleandefaultfalse);--you can query User_tables, all_tables, dba_tables Data Dictionary views for statistical information after analysis. --you can use the Analyze statement to clear the statistics for a table in the data dictionary, with the following syntax:AnalyzeTable[schema.]Table Delete[system]Statistics; analyzeTableEmployeesDelete Statistics;--When you delete a table's statistics, the statistics for all indexes on that table are also deleted. --Validating table storage structureAnalyzeTable[schema.]TableValidate structure--[cascade--the integrity of the table, it also verifies the integrity of the indexes that are defined on the table.        [complete--Full storage structure integrity validation for tables and their indexes, default values.] [Into[schema.]Table]--saves the rowid of the records returned with the corrupted data block to the user-defined table.         [offline--does not allow DML operations on tables when the table is stored for structural integrity validation. The default value. |online]--If a table is stored for structural integrity validation, you must use the online parameter if a user has DML operations on the table .                  --Store structural integrity validation of tables online. This, while slightly impacting DML execution performance, provides greater flexibility for the table's storage structure integrity validation. ]|Fast--full structural integrity validation of tables and indexes takes a lot of resources, and the fast parameter can be used to validate the algorithm using the optimization validation method.           --This validation method can quickly implement integrity validation on a table, but does not return details about the corrupted data block. ];@d: \app\administrator\product\11.2.0\dbhome_1\rdbms\admin\utlvalid.sql;--Create a default table Invalid_rowsAnalyzeTableEmployees validate structure;--Analysis Table@D: \app\administrator\product\11.2.0\dbhome_1\rdbms\admin\utlchn1. SQL;--chained_rows TableAnalyzeTable[schema.]TableList chained rows[into[schema.table]];--Analyze row links, row migration Scenarios

Oracle Database Maintenance Operations 2

Related Article

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.