Oracle Database Attention Log: A Practical Guide
- Vijayganesh Tirupattur Sivaprakasam
- Jan 21
- 4 min read

What is the Attention Log?
When an error happens, the first place you go is your alert.log file and look at the entries. But the problem here is that your alert log contains a whole array of entries!
Luckily, 26ai has a new feature called the Attention Log. The attention log solves this problem by acting as your databases prioritized task list, filtering out noise and highlighting only what demands your attention right now.
The attention log is a JSON formatted file that captures critical database events with clear urgency levels and actionable recommendations. It doesn’t replace the alert.log it complements it by providing a curated view of events that require administrator action.
Where is the Attention Log?
The attention log location can be easily found by using the query below.
SQL> select name,value from v$diag_info where name like 'Attention%';
NAME VALUE
--------------- --------------------
Attention Log /u01/app/oracle/diag/rdbms/acedb_hgv_syd/ACEDB/trace/attention_ACEDB.logHistory: From 21c to 26ai
The attention log was introduced in Oracle Database 21c in 2021 as part of the enhanced diagnostics infrastructure. It provided structured JSON messages with urgency levels (IMMEDIATE, SOON, DEFERRABLE, INFORMATION) and fields like ERROR, CAUSE, ACTION, and CLASS. However, the initial implementation had a limitation: there was no native SQL view, which meant DBAs had to parse JSON files manually.
Oracle 23ai and its subsequent release of 26ai has a new view V$DIAG_ATTENTION. This native SQL view finally allows DBAs to query attention messages directly from the database, making it easier to integrate with monitoring tools, create automated alerts, and build custom dashboards.
Understanding Attention Log Content
Let’s examine a real attention log entry to understand its structure:

Breaking Down the Fields
ERROR: Describes the issue in this case, a missing encryption master key that will prevent Data Guard from encrypting replicated data, creating a security gap.
URGENCY: Indicates priority. IMMEDIATE means drop everything and fix it now. Other levels are SOON (within hours), DEFERRABLE (next maintenance window), and INFORMATION (no action needed).
CAUSE: Explains why the error occurred. Here, it's straightforward that the master key configuration was never completed.
ACTION: Provides the fix. Instead of researching documentation, you get the exact command to run: ADMINISTER KEY MANAGEMENT SET ENCRYPTION KEY.
CLASS: Contains three parts: Scope (CDB Instance), Target User (CDB ADMINISTRATOR who should fix it), and Attention ID (AL-5202 is a unique identifier for tracking).
TIME: ISO 8601 timestamp with time zone for precise event correlation and audit trails.
Here is another example, showing a basic database configuration which was done incorrectly, the urgency of the issue is not immediate but should be done soon, and it’s categorised as a warning, not an error.

Querying with V$DIAG_ATTENTION (23ai)
Oracle 23ai introduced V$DIAG_ATTENTION, a dynamic performance view that displays attention messages from the Automatic Diagnostic Repository (ADR). This view is specific to the current container (PDB) and provides structured access to attention log data without manual JSON parsing.
Key columns include:
ORIGINATING_TIMESTAMP - When the event occurred
MESSAGE_TEXT - The attention message content
MESSAGE_TYPE - Error, Warning, or Notification
URGENCY - IMMEDIATE, SOON, DEFERRABLE, or INFORMATION
ATTENTION_ID - Unique identifier (e.g., AL-5202)
Example query to find critical events:
SELECT originating_timestamp, message_text, urgency FROM v$diag_attention WHERE urgency IN ('IMMEDIATE', 'SOON') AND originating_timestamp > SYSTIMESTAMP - INTERVAL '24' HOUR ORDER BY originating_timestamp DESC;Key Advantages
So let's look at the advantages of the attention log compared to the alert log. For me, these come down to:
Faster Resolution: Built-in ACTION guidance eliminates research time
Smart Prioritisation: Four level urgency system enables intelligent work planning
Automation Friendly: JSON format and SQL access enable event-driven automation
Skill Levelling: Junior DBAs receive expert-level guidance on unfamiliar issues.
Having said that, the alert log is still a very important aspect of troubleshooting.
Potential Improvements
I still think there is room for improvement here. In my dream world, the following could also be addressed to the benefit of all DBA’s:
Performance: Add native indexing on timestamp and urgency fields for faster queries.
Customization: Allow DBAs to define custom attention messages for application-specific events.
Documentation: Provide a complete catalogue of all attention IDs with examples (I hope this is not a randomly generated number).
MOS Integration: Direct links from attention IDs to knowledge base articles (If the above is true, otherwise it is not needed).
ML-Powered Insights: Predictive alerts based on historical patterns and anomaly detection.
Conclusion
The attention log transforms database diagnostics from reactive troubleshooting to proactive management. The introduction of V$DIAG_ATTENTION in Oracle 23ai removes the biggest barrier to easy integration with OEM and other monitoring software by providing native SQL access to attention log data.
As demonstrated with the encryption key example, the attention log doesn’t just identify problems; it provides context, urgency classification, root cause analysis, and specific remediation steps. This level of guidance significantly reduces Mean Time to Resolution (MTTR) and empowers teams of all skill levels to handle critical issues effectively.
For organisations managing Oracle databases, integrating attention log monitoring into your operational playbook is no longer optional; it’s essential for maintaining reliability, security, and operational excellence in modern database environments.
What do you think about this small but significant feature addition that not only helps us narrow down the issue but also provides recommendations for resolution?
Do you think there should be more improvements in diagnosis and problem resolution? Tell me about it!
You can read more about this here: Diagnosing and Resolving Problems
Contact: tsvganesh@gmail.com






Comments