- Introduction :
When you manage an Oracle database in production, performance problems are inevitable. A query suddenly slows down, users start complaining, and you need to figure out what went wrong fast. This is where ADDM comes in.
ADDM stands for Automatic Database Diagnostic Monitor. It is a self-diagnostic engine built directly into Oracle Database. It analyzes performance data on its own, identifies bottlenecks, and gives you recommendations all without you having to write complex queries or dig through endless statistics.
Think of ADDM as your first responder. When something goes wrong, it tells you:
-
What the problem is
-
How much it is affecting your system
-
What you should do about it
- How ADDM Works – The Basics :
Before we get into the steps, let me explain the theory behind ADDM in simple terms.
Oracle Database continuously collects performance data through AWR (Automatic Workload Repository). By default, it takes a snapshot every 60 minutes. Once a snapshot is captured, ADDM automatically runs and analyzes the data from the previous snapshot to the current one.
The core idea behind ADDM is something called DB Time. DB Time is the total amount of time spent by the database processing user requests. ADDM looks at DB Time and asks a simple question:
“Where is all this time going?”
If a lot of DB Time is being wasted on row lock contention, ADDM will flag it. If SQL statements are consuming too much CPU, ADDM will tell you. If there is an I/O bottleneck, ADDM will point it out.
Every problem ADDM finds is called a Finding. Each finding has an impact percentage, this tells you how much of the total DB Time is being wasted because of that problem. The higher the impact, the more urgent it is.
For each finding, ADDM also gives you a Recommendation. This is an actionable step you can take to fix the problem. It might be running SQL Tuning Advisor, adding an index, or changing a parameter.
- ADDM vs AWR vs ASH :
People often confuse these three. Let me clear it up.
| Tool | What It Does | Time Scope |
|---|---|---|
| AWR | Stores historical performance data | Long-term (default: 8 days) |
| ASH | Samples active sessions every second | Short-term (last 30 minutes or so) |
| ADDM | Analyzes AWR data and gives recommendations | Based on AWR snapshots |
The relationship is simple: ASH feeds AWR, and AWR feeds ADDM.
Prerequisites – Make Sure ADDM is Enabled :
ADDM only works if the STATISTICS_LEVEL parameter is set to TYPICAL or ALL. If it is set to BASIC, ADDM will not collect any data.
Check the Current Setting :
SHOW PARAMETER statistics_level;
You should see something like this:
| NAME | TYPE | VALUE |
|---|---|---|
| statistics_level | string | TYPICAL |
If the value is BASIC, change it:
ALTER SYSTEM SET statistics_level = TYPICAL;
You do not need to restart the database for this change. However, ADDM will not start working until the next AWR snapshot is captured.
Step 1 – View Recent ADDM Findings :
Oracle automatically runs ADDM after every AWR snapshot. So the easiest way to see findings is to look at the most recent completed ADDM task.
Using SQL*Plus
SET LONG 100000 SET PAGESIZE 50000 SET LINESIZE 200 SELECT DBMS_ADDM.GET_REPORT(task_name => (SELECT task_name FROM dba_advisor_tasks WHERE advisor_name = 'ADDM' AND status = 'COMPLETED'
ORDER BY execution_end DESC FETCH FIRST 1 ROW ONLY)) AS addm_report FROM dual;
Using DBA_ADDM_FINDINGS View :
If you prefer a tabular output instead of a full report:
SELECT task_name, finding_name, impact_percent, type, message FROM dba_addm_findings WHERE task_name = (SELECT task_name FROM dba_advisor_tasks WHERE advisor_name = 'ADDM' AND status = 'COMPLETED' ORDER BY execution_end DESC FETCH FIRST 1 ROW ONLY) ORDER BY impact_percent DESC;
What the Output Looks Like
| FINDING_NAME | IMPACT_% | MESSAGE |
|---|---|---|
| Top SQL Statements | 45.2 | SQL statements consuming significant DB time |
| Row Lock Contention | 12.8 | Sessions waiting on row-level locks |
| Hard Parse | 8.5 | High parsing activity |
| I/O Throughput | 5.3 | I/O subsystem bottleneck |
How to Read This
The IMPACT_PERCENT column is the most important number here. It tells you what percentage of your total DB Time is being wasted because of that specific problem.
My advice: Always start with the highest impact finding. Do not get distracted by small issues when a big one is staring at you.
Step 2 – Understand the ADDM Report
Here is a sample ADDM report section:
FINDING 1: 45.2% impact (1200 seconds) --------------------------------------- SQL statements consuming significant database time were found. RECOMMENDATION 1: SQL Tuning, 45.2% benefit (1200 seconds) ACTION: Run SQL Tuning Advisor on the SELECT statement with SQL_ID "abc123xyz". REASON: SQL statement was responsible for significant database time.
Let me break down what each part means:
| Section | What It Tells You |
|---|---|
| Finding | The problem name and its impact percentage |
| Recommendation | What action you should take |
| Action | The specific step or SQL command to run |
| Benefit | How much improvement you will get if you follow the recommendation |
| Reason | Why ADDM is making this recommendation |
Common ADDM Findings and What They Mean :
Over the years, I have seen certain findings come up again and again. Here are the most common ones and what you should do about them.
| Finding | What It Means | What You Should Do |
|---|---|---|
| Top SQL | Some SQL statements are eating up a lot of DB Time | Run SQL Tuning Advisor on those statements |
| Row Lock Contention | Sessions are waiting for each other’s locks | Look at your application logic; check for uncommitted transactions |
| Hard Parse | Too much time spent parsing SQL | Use bind variables instead of literals |
| I/O Throughput | Disk subsystem cannot keep up | Check storage performance; consider adding disks |
| CPU Usage | CPU is the bottleneck | Tune SQL or add more CPU capacity |
| Undo/Redo Contention | Redo logs are too small | Increase redo log file size |
Step 3 – Run ADDM Manually for a Specific Time Period :
Automatic ADDM runs every hour. But sometimes you need to analyze a specific window — maybe there was an incident last night between 2 AM and 3 AM, and you want to know what happened.
This is where manual ADDM comes in.
SQL Command :
VARIABLE task_id NUMBER; VARIABLE task_name VARCHAR2(30); BEGIN :task_name := 'ADDM_MANUAL_01'; :task_id := DBMS_ADDM.ANALYZE_DB( task_name => :task_name, begin_snapshot => 100, end_snapshot => 101, db_id => NULL ); END; / PRINT task_id PRINT task_name
Replace 100 and 101 with the actual AWR snapshot IDs for your time window.
Get the Report :
SELECT DBMS_ADDM.GET_REPORT('ADDM_MANUAL_01') FROM dual;
When to Use Manual ADDM
-
You know exactly when a problem occurred
-
Automatic ADDM missed something
-
You want to analyze a specific SQL or session
Step 4 – Handle Failed ADDM Tasks :
Sometimes ADDM tasks fail. This can happen for a few reasons:
-
AWR snapshots expired before ADDM could analyze them
-
The database was idle (not enough workload data)
-
Resource constraints (not enough memory or temp space)
Check for Failed Tasks :
SELECT task_id, task_name, status, error_message FROM dba_addm_pending_autotasks WHERE status = 'FAILED';
Re-execute Failed Tasks :
BEGIN DBMS_ADDM.REEXECUTE_FAILED_AUTO_TASKS( instance_number => 1, begin_snapshot => 100, end_snapshot => 110, time_budget_in_sec => 300, max_attempts => 3 ); END; /
Generate a Failure Report
SELECT DBMS_ADDM.FAILED_AUTO_TASKS_REPORT(instance_number => 1, begin_snapshot => 100, end_snapshot => 110) FROM dual;
Step 5 – ADDM in Oracle Cloud (OCI) :
If you are running Oracle Database on Oracle Cloud Infrastructure, you can access ADDM findings through the Performance Hub graphical interface.
How to Access
-
Go to your database details page
-
Click on Performance Hub
-
Select the ADDM tab
-
Choose your time range
-
Click on the gray AWR snapshot icons
What You Will See
| Section | Content |
|---|---|
| Findings | Problem name, impact, number of recommendations |
| Warnings & Information | Messages about data quality or completeness |
You can also run a manual ADDM task directly from Performance Hub by clicking the Run ADDM Task button.
Best Practices for Using ADDM :
Here is what I recommend based on real-world experience:
-
Review ADDM daily – Make it part of your morning routine.
-
Prioritize by impact – Always tackle the highest impact finding first.
-
Do not ignore warnings – They often indicate data quality issues that can mislead you.
-
Cross-reference with ASH – Use ASH data to validate ADDM findings.
-
Set up alerts – Automate monitoring for critical ADDM findings.
-
Keep AWR retention adequate – At least 30 days is recommended.
-
Use manual ADDM for incidents – When something goes wrong at a specific time, analyze that window.
How ADDM Connects to Previous Topics
| Previous Topic | Connection to ADDM |
|---|---|
| Blocking Sessions | ADDM identifies “Row Lock Contention” as a finding |
| Deadlocks | ADDM reports deadlocks as a finding with impact percentage |
| SQL Tuning | ADDM recommends running SQL Tuning Advisor |
| AWR | ADDM uses AWR snapshots as its input |
Summary
| Step | What You Do | Why It Matters |
|---|---|---|
| 1 | Check STATISTICS_LEVEL |
Make sure ADDM is enabled |
| 2 | View recent ADDM findings | See what problems exist right now |
| 3 | Read the report carefully | Understand impact and recommendations |
| 4 | Run ADDM manually if needed | Analyze specific time windows |
| 5 | Handle failed tasks | Do not let incomplete analysis go unnoticed |
| 6 | Use Cloud Performance Hub | Graphical interface for OCI users |
| 7 | Follow best practices | Stay proactive, not reactive |
Final Thoughts :
ADDM is one of the most powerful tools Oracle gives you for free. It is like having an expert DBA looking over your shoulder, constantly analyzing your database and telling you what needs attention.
The key is to actually use it. Do not wait for users to complain. Check ADDM regularly. Understand what it is telling you. Act on the recommendations.
If you do this consistently, you will catch problems before they become emergencies.
Oracle Solutions We believe in delivering tangible results for our customers in a cost-effective manner