Viewing an Alert Log from ADRCI

You want to view an alert log by using ADRCI commands.

To view an alert log with ADRCI, follow these steps:

Invoke ADRCI.
$ adrci

Set the ADR home with the set homepath command.
adrci> set homepath diag/rdbms/orcl/orcl

Enter the following command to view the alert log:
adrci> show alert
ADR Home = /u01/app/oracle/diag/rdbms/orcl/orcl:
Output the results to file: /tmp/alert_3573_13986_orcl_1.ado
show alert

The alert log will pop up in your default editor. The ADRCI prompt will return once you close the text file in the
You can also query the V$DIAG_INFO view to find the path that corresponds to the Diag Trace entry. You can
change the directory to that path and open the alert_<db_name>.log file with a text editor.

The show alert command brings up the XML-formatted alert log without displaying the XML tags. You can set
the default editor with the SET EDITOR command, as shown here:
adrci> set editor notepad.exe
The previous command changes the default editor to Notepad. The show alert -term command shows the
alert log contents in the terminal window. If you want to examine just the latest events in the alert log, issue the
following command:
adrci>show alert -tail 50

The tail option shows you a set of the most recent lines from the alert log in the command window. In this
example, it shows the last 50 lines from the alert log. If you don’t specify a value for the tail parameter, by default, it
shows the last 10 lines from the alert log.
The following command shows a “live” alert log, in the sense that it will show changes to the alert log as the
entries are added to the log.

adrci> show alert -tail -f
The previous command shows the last 10 lines of the alert log and prints all new messages to the screen, thus
offering a “live” display of ongoing additions to the alert log. The CTRL+C sequence will take you back to the ADRCI

When troubleshooting, it is very useful to see if the database issued any ORA-600 errors. You can issue the
following command to trap the ORA-600 errors.
adrci> show alert -p “MESSAGE_TEXT LIKE ‘%ORA-600%'”

  • January 16, 2019 | 18 views
  • Comments