In today’s article, we will be learning about the Alert files that we will write about the errors and changes in the Database.
This file is located in the directory specified in the BACKGROUND_DUMP_DEST parameter with the name alert_<SID>.log.
1 2 3 4 5 | SQL> show parameter background_dump NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ background_dump_dest string /oracle/diag/rdbms/onurdb/ONURDB/trace |
Or we can find it by querying the v$parameter view.
1 2 3 4 5 6 7 8 9 10 11 | SQL> SELECT NAME, VALUE FROM V$PARAMETER WHERE NAME like '%background%'; NAME -------------------------------------------------------------------------------- VALUE -------------------------------------------------------------------------------- background_core_dump partial background_dump_dest /oracle/diag/rdbms/onurdb/ONURDB/trace |
In the Alert File:
Opening-closing the database,
Add-delete redo log group,
Adding-deleting tablespace,
parameter changes,
ORA errors are found.
Below is a short excerpt from the alert file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ALTER DATABASE MOUNT Successful mount of redo thread 1, with mount id 469055364 Database mounted in Exclusive Mode Lost write protection disabled Completed: ALTER DATABASE MOUNT Mon Jun 29 17:40:25 2015 ALTER DATABASE OPEN Thread 1 opened at log sequence 134 Current log# 2 seq# 134 mem# 0: /oracle/ora11g/data_ONURDB/ONURDB/redo02.log Successful open of redo thread 1 ALTER DATABASE CLOSE NORMAL Mon Jun 29 17:32:49 2015 SMON: disabling tx recovery SMON: disabling cache recovery Mon Jun 29 17:32:49 2015 Shutting down archive processes Archiving is disabled Archive process shutdown avoided: 0 active Thread 1 closed at log sequence 134 Successful close of redo thread 1 Completed: ALTER DATABASE CLOSE NORMAL ALTER DATABASE DISMOUNT Shutting down archive processes Archiving is disabled Completed: ALTER DATABASE DISMOUNT |
See Latest Logs
The last 1000 records coming to the alert file can be seen as follows.
1 | tail -1000f /u01/app/oracle/diag/rdbms/mwdb/mwdb1/trace/alert_mwdb1.log |