Databases Reference
In-Depth Information
2. To run the ADDM in Instance mode (a single instance of the database will be
analyzed), we will use the following statement:
VAR task_name VARCHAR2(30);
BEGIN
:task_name := 'Report for 3 to 5 inst. 1';
DBMS_ADDM.ANALYZE_INST (:task_name, 3, 5, 1);
END;
3. To run the ADDM in Partial mode (a subset of all database instances will be
analyzed), we will use the following statement:
VAR task_name VARCHAR2(30);
BEGIN
:task_name := 'Custom for 3 to 5 inst. 1,2';
DBMS_ADDM.ANALYZE_INST (:task_name, '1,2', 3, 5);
END;
4. To view the results we will query the DBMS_ADDM.GET_REPORT function, passing
the name of the task used in generating the reports:
SELECT DBMS_ADDM.get_report('Report for 3 to 5') FROM DUAL;
SELECT DBMS_ADDM.get_report('Report for 3 to 5 inst. 1') FROM
DUAL;
SELECT DBMS_ADDM.get_report('Custom for 3 to 5 inst. 1,2') FROM
DUAL;
Each line in the previous code will display the corresponding ADDM report.
How it works...
Automatic Database Diagnostic Monitor runs automatically every time a new snapshot is
taken by AWR (by default every hour), and the corresponding report is built comparing the
last two snapshots available, so we have an ADDM report every hour.
With the statement presented, we can run a report between snapshots to identify possible
problems. The reports can be built, for a Real Application Cluster configuration, with three
analysis models: database, instance, and partial. In non-RAC databases, only instance
analysis is possible because there is only one instance of the database.
 
Search WWH ::




Custom Search