8i | 9i | 10g | 11g | 12c | 13c | 18c | 19c | 21c | 23ai | Misc | PL/SQL | SQL | RAC | WebLogic | Linux

Home » Articles » 21c » Here

Attention Log in Oracle Database 21c

Over the years the database alert log has become very overcrowded, making it difficult to filter out the important messages from all the noise. The attention log is a JSON formatted file introduced in Oracle 21c to capture critical events, making system diagnostics easier.

Related articles.

Attention Log Location

There is a single attention log for each database. The location of the attention log can be found by querying the V$DIAG_INFO view. The query below shows all the information from the V$DIAG_INFO view.

set linesize 100 pagesize 20
column name format a25
column value format a70

select name, value
from   v$diag_info
order by 1;

NAME                      VALUE
------------------------- ----------------------------------------------------------------------
ADR Base                  /u01/app/oracle
ADR Home                  /u01/app/oracle/diag/rdbms/cdb1/cdb1
Active Incident Count     2
Active Problem Count      1
Attention Log             /u01/app/oracle/diag/rdbms/cdb1/cdb1/trace/attention_cdb1.log
Default Trace File        /u01/app/oracle/diag/rdbms/cdb1/cdb1/trace/cdb1_ora_12511.trc
Diag Alert                /u01/app/oracle/diag/rdbms/cdb1/cdb1/alert
Diag Cdump                /u01/app/oracle/diag/rdbms/cdb1/cdb1/cdump
Diag Enabled              TRUE
Diag Incident             /u01/app/oracle/diag/rdbms/cdb1/cdb1/incident
Diag Trace                /u01/app/oracle/diag/rdbms/cdb1/cdb1/trace
Health Monitor            /u01/app/oracle/diag/rdbms/cdb1/cdb1/hm
ORACLE_HOME               /u01/app/oracle/product/21.0.0/dbhome_1

13 rows selected.


We could limit this to just the attention log.

select name, value
from   v$diag_info
where  name = 'Attention Log';

NAME                      VALUE
------------------------- ----------------------------------------------------------------------
Attention Log             /u01/app/oracle/diag/rdbms/cdb1/cdb1/trace/attention_cdb1.log


Attention Log Contents

The attention log contains JSON formatted messages. Here are two example messages from my test database.

  "ERROR"        : "PMON (ospid: 2070): terminating the instance due to ORA error 12752",
  "INFO"         : "Additional Information Not Available",
  "CAUSE"        : "The instance termination routine was called",
  "ACTION"       : "Check alert log for more information relating to instance termination rectify the error and restart the instance",
  "CLASS"        : "CDB Instance / CDB ADMINISTRATOR / AL-1003",
  "TIME"         : "2021-10-13T03:36:50.671+00:00"

  "NOTIFICATION" : "Starting ORACLE instance (normal) (OS id: 1146)",
  "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"         : "2021-10-13T10:46:01.949+00:00"

We can see the elements present may be different for different types of messages. The documentation breaks these down as follows. I've added my own comments in bold.

The explanation of the attention log contents is followed by an example message which doesn't match the explanation in the documentation, or the style of message I'm seeing in the 21c attention log.

Attention Log Contents From SQL

There doesn't appear to be a V$ view for the attention log. The documentation suggests using the V$DIAG_ALERT_EXT View, but this is a view over the XML alert log, not the attention log. It is possible to parse this yourself.


Here are some thoughts I had when looking at the attention log.

Overall, my impression is it's a nice idea, but I'm not sure I agree with the implementation, and the documentation needs a lot of work.

For more information see:

Hope this helps. Regards Tim...

Back to the Top.