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.

4 Responses to adrci – No ADR base is set

  1. Hi Marcel

    Just encountered the same issue. The problem was that the file is there but non-privileged users (not oracle owner) do not have read rights to it. Once I read rights granted, it starts working.
    For me on 11gR1 adrci_dir.mif has not lines at all. On 11gR2 it contains 1 line

    Kirill Loifman,

  2. DBA says:

    Thank you Marcel, useful post. Help us a lot!

  3. Danja says:

    Thank you! It works!

  4. Doru Crinta says:

    We also have instances sharing the oracle home but they have separate diagnostic locations.
    So we just replaced the adrci_dir.mif by a new one containing just:


    and the we made it read only ( mask 444).
    Now the db startup does not overwrite/destroy it anymore and if you have the ORACLE_SID correctly set-up the adrci scripts resolve to the correct ADR base.

Leave a Reply to Doru Crinta Cancel reply

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

Blue Captcha Image