DBMS_UTILITY.analyze_schema : dbms_utility « System Packages « Oracle PL / SQL






DBMS_UTILITY.analyze_schema

   
SQL>
SQL> CREATE OR REPLACE PROCEDURE analyze_oem
  2  IS
  3     CURSOR curs_get_hour IS SELECT TO_CHAR (SYSDATE, 'HH24') FROM dual;
  4     v_current_hour NUMBER (2);
  5     v_method_opt VARCHAR2 (15);
  6  BEGIN
  7     OPEN curs_get_hour;
  8     FETCH curs_get_hour INTO v_current_hour;
  9     CLOSE curs_get_hour;
 10
 11     IF v_current_hour IN (1, 2)
 12     THEN
 13        v_method_opt := NULL;
 14     ELSE
 15        v_method_opt := 'FOR ALL INDEXES';
 16     END IF;
 17
 18     DBMS_UTILITY.analyze_schema (
 19        schema => 'OEM',
 20        method => 'COMPUTE',
 21        method_opt => v_method_opt
 22     );
 23  END analyze_oem;
 24  /

Procedure created.

   
    
  








Related examples in the same category

1.This script demonstrates DBMS_UTILITY.NAME_TOKENIZE.
2.Use dbms_utility to time
3.time to commit
4.dbms_utility.get_parameter_value
5.Call dbms_utility.get_time twice to time a statement in PL SQL
6.round dbms_utility.get_time
7.Assign dbms_utility.get_time to integer variable
8.Use dbms_utility.get_time to do performace check
9.dbms_utility.format_error_stack
10.Timing Per Thousand Records Processed (in secs)
11.Timing Package function call
12.use DBMS_UTILITY.FORMAT_ERROR_STACK in a SERVERERROR trigger.
13.demonstrates the use of DBMS_UTILITY.TABLE_TO_COMMA and DBMS_UTILITY.COMMA_TO_TABLE.
14.Performace difference between simple parameter and collection parameter