September 08, 2008

Questions on Automatic Diagnostic Monitor

Reference: http://www.iselfschooling.com/mcd12_ora10g/Oracle10g_Answers.htm

Q: What does the Automatic Database Diagnostic Monitor?
A: The Automatic Database Diagnostic Monitor (ADDM) maintains a self-diagnostic to a database. It will either perform a treatment or refer it to specialists such as the SQL tuning advisor.

Q: How does ADDM work?
A: The Oracle database automatically gathers statistics from the SGA every 60 minutes and stores them in the Automatic Workload Repository (AWR) in the form of snapshots. These snapshots are similar to STATSPACK snapshots. The MMON process, it is a process that schedules the ADDM to run automatically to detect problems proactively for every two last snapshots. It is possible also to invoke an ADDM analysis manually.

Q: Where can I access the latest ADDM run?
A: Go to the Database Control home page, on the Diagnostic Summary section you will see the number of ADDM finding from the previous automatic run. Click on the Performance Findings link. The Automatic Database Diagnostic Monitor (ADDM) page will be display with the details of the latest ADDM run.

Q: How can I turn the ADDM process off?
A: By default the ADDM process is enabled since the STATISTICS_LEVEL initialization parameter is TYPICAL. By setting these parameters to BASIC, it will stop to run automatically.

Q: How can you check your ADDM default setting?
A: Execute the following SQL statement.
SQL> SELECT parameter_value, is_default
FROM dba_advisor_def_parameters
WHERE advisor_name = ‘ADDM’
/

Q: How can I retrieve ADDM Reports using SQL?
A: You should type the following SQL statement to display the most recent ADDM report using a SQL command.
SQL> SELECT dbms_advisor.GET_TASK_REPORT(task_name)
FROM dba_advisor_tasks
WHERE task_id = (SELECT max(t.task_id)
FROM dba_advisor_tasks t, dba_advisor_log l
WHERE t.task_id = l.task_id AND t.advisor_name = ‘ADDM’
AND l.status = ‘COMPLETED’
/
or
SQL> @$ORACLE_HOME/rdbms/addmrpt

Q: What is the Automatic Shared Memory Management (MMAN)?
A: It maintains the management of the most important shared memory structures. For example, if your system runs OLTP during the day and large parallel batch jobs at night, you may not need to decrease buffer cache and increase large pool in order to satisfy the needs of your nightly jobs. The MMAN background process should do that.

Q: How do you enable or disable Automatic Shared Memory Management?
A: Go to your Database Control page. Click on the Administration tab, select Memory Parameters under the Instance heading, and click the SGA tab. Now, you are able to enable or disable. When you enable it, you can enter the total SGA size or the SGA_TARGET value. If you set SGA_TARGET to 0, Automatic Shared Memory Management will be disabled.

Q: How do you determine the actual size of the auto-tuned components in the SGA?
A: When the SGA_TARGET value is set to no-zero, you can determine the actual size of the auto-tuned components in the SGA by the following SQL statement.
SQL> SELECT component, current_size/1024/1024
FROM v$sga_dynamic_components
/
Notice that if the SGA_TARGET value is no-zero and no value for an auto-tuned SGA parameter, then the values of the auto-tuned SGA parameters in the v$parameter view is 0. You will see the values if you assigned a value for any of the auto-tuned parameters.
SQL> SELECT name, value, isdefault
FROM v$parameter
WHERE name LIKE ‘%size’
/

Q: How do you change the SGA_TARGET value?
A: You can change it by using the ALTER SYSTEM command dynamically. The value can be increased up to the value of SGA_MAX_SIZE.

Q: What is Automatic Checkpoint Tuning?
A: It will make the best effort to write out dirty buffers without adverse impact on the database automatically. To enable it you should set the FAST_START_MTTR_TARGET value to a nonzero value and all the checkpoint parameters will be ignored.

0 comments: