Adrci
is a new tool in Oracle 11g which makes life a little easier when gathering evidence to send off to Oracle Support, but it can make life easier when you simply wish to view the alert log, for example.
As ever, you need to be logged in to the database server and have the environment set in the normal oraenv
manner. This is how we used to do it in the old, pre 11g, days:
|
|
|
|
In modern times, with 11g of course, we no longer have to do this, as we have adrci
instead, as follows:
|
|
That’s all there is to it. The alert log is, on my server, displayed in the vi
editor and when you quit with the :q
command, you return to adrci
.
While you are there, you can check for any incidents recorded in the alert log:
|
|
Given that ORA-600, I can get more detail about it with the following command:
|
|
The -mode
option can be one of:
- Basic - simply lists the appropriate line(s) that you would see in a
show incident
command output. Not much use to be honest. - Brief - gives a bit more detail that basic. Doesn’t include details of any trace files created for this incident.
- Detail - gives lots of information including details of all trace files created for this incident.
The -p
option is simply a where
clause on any of the columns in the incident table. You can obtain a list of columns as follows:
|
|
The -p
options can be ANDed and/or ORed together:
|
|
Given that incident 40165 is an ORA-600, it should be sent off to Oracle Support for diagnosis, so I need to gather all the evidence together. Remember how that was done in the old days? Well, this is how simple it is with adrci
:
First, create a new package:
|
|
That creates a blank package, with nothing in it. You now add all the incidents you need to add:
|
|
That has added the incident to the package’s metadata only, there are still no actual package files created. You may add further incidents to the package as desired.
When done adding incidents, generate a physical package for support:
|
|
The zip file name created contains everything Oracle Support will need, all the trace files, the alert log, various metadata files and so on. This file can be uploaded to Oracle Support.
The file is created in the current working directory. If you want to specify where to put it, the following command will help:
|
|
That concludes this very brief overview of the adrci
utility. For more details check out the Database Administrator’s Guide, Chapter 9 - Managing Diagnostic Data Have fun.