adrci – No ADR base is set

Some time ago we had a problem using the adrci (ADR Command Interpreter) to look into some diagnostic information for a listener. After staring up the tool it came back with the warning “No ADR base is set”, even while the ORACLE_BASE environment variable was set. While it is possible to use the SET BASE <ADR base directory> to set the ADR base manually in the adrci it should work without this manual setting so we an use it safely from within scripts. Looking on MOS you get “Very” little results (only bug 1007522) and the solution is rather rigorous just for getting the correct path to the ADR base: restart your database/asm instance!

The actual problem is a corrupted or missing file named adrci_dir.mif which is located in $ORACLE_HOME/log/diag. The adrci_dir.mif file contains the path to the ADR base. The adrci gets the ADR base path from this file and when it does not exist or the file is corrupted you get the “No ADR base is set” warning. The adrci_dir.mif file is created when a database or asm instance is started and can get corrupted when two instances start at the same time. Starting a listener does not create/change this file!

To get the problem fixed without the rather absurd method of restarting one of the instances in the Oracle home having this issue, you can use the method below to create/overwrite the adrci_dir.mif file with the correct ADR base path. Don’t use standard vi of a normal echo while this will add a NewLine character (0x0a) at the end of the path, also resulting in the “No ADR base is set” warning.

printf "%s" "<ADR base path>" > $ORACLE_HOME/log/diag/adrci_dir.mif

For example:

printf "%s" "/u01/app/oracle" > $ORACLE_HOME/log/diag/adrci_dir.mif

It looks like in Oracle 11g release 2 things have changed a little bit, because there well be two lines in the adrci_dir.mif file. The first lines still contains the location of the ADR base path, but the seconds line specifies another path. As I find out more about this one I will update this post.

This entry was posted in Database and tagged , , , , , , . Bookmark the permalink.

3 Responses to adrci – No ADR base is set

Leave a Reply

Your email address will not be published. Required fields are marked *

Blue Captcha Image
Refresh

*