Attention log in Oracle Database 21c

Attention log file is used to check the critical events in the Oracle database quickly. One instance of the database has one attention log file. Attention log is a structured, externally modifiable file that contains information about critical and highly visible database events.

Example of the Attention log file:

{
  "NOTIFICATION" : "Shutting down ORACLE instance (immediate) (OS id: 24084)",
  "URGENCY"      : "INFO",
  "INFO"         : "Shutdown is initiated by oradim.exe. ",
  "CAUSE"        : "A command to shutdown the instance was executed",
  "ACTION"       : "Check alert log for progress and completion of command",
  "CLASS"        : "CDB Instance / CDB ADMINISTRATOR / AL-1001",
  "TIME"         : "2022-10-26T17:09:00.201+05:30"
}

{
  "NOTIFICATION" : "Starting ORACLE instance (normal) (OS id: 45728)",
  "URGENCY"      : "INFO",
  "INFO"         : "Additional Information Not Available",
  "CAUSE"        : "A command to startup the instance was executed",
  "ACTION"       : "Check alert log for progress and completion of command",
  "CLASS"        : "CDB Instance / CDB ADMINISTRATOR / AL-1000",
  "TIME"         : "2022-10-26T17:09:25.857+05:30"
}

Check the location of the Attention log in Oracle Database 21c

set line 200
col value for a70
col name for a15
select name, value from v$diag_info where name = 'Attention Log';
NAME          VALUE
------------- ---------------------------------------------------------------
Attention Log  C:\APP\PRODUCT\21C\diag\rdbms\xe\xe\trace\attention_xe.log

View Attention Log file critical error as used message_level=1:

SELECT container_name, message_id, message_type, message_text, version, host_id, component_id FROM V$DIAG_ALERT_EXT WHERE message_level = 1;

Refer:

https://docs.oracle.com/en/database/oracle/oracle-database/21/admin/diagnosing-and-resolving-problems.html#GUID-633CC0D9-8FA8-4D98-8BE2-967D1CBEE266

https://docs.oracle.com/en/database/oracle/oracle-database/21/admin/diagnosing-and-resolving-problems.html#GUID-4A484D86-ED31-45CE-AECE-4384882A5A7A

This entry was posted in Oracle on by .
Unknown's avatar

About SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Leave a Reply