By Clemens Bleile

From Oracle Database Appliance (ODA) version 19.11. onwards the ORACLE_HOMEs and ORACLE_BASE will be created on ACFS, i.e. take space from an ASM-diskgroup instead of taking filesystem space from /u01. See this blog concerning details.

If the ODA has been upgraded from a release < 19.11. to 19.11. or newer, then you usually have diag- and admin-data in 2 ORACLE_BASE-locations:


for databases created before migrating to ODA 19.11. or newer and


for databases created after the migration to ODA 19.11. or newer.

An ORACLE_HOME is associated to an ORACLE_BASE. This can be shown by running the command orabase:

[email protected]:/home/oracle/ [rdbms191300] orabase

orabase takes its info from


Migrating databases created before ODA 19.11. to an ORACLE_HOME created after the installation of ODA 19.11. causes diagnostics and admin-data to remain in the “old” ORACLE_BASE /u01/app/oracle, but the command orabase points to the “new” ORACLE_BASE /u01/app/odaorabase/oracle. Tools, which rely on a global ORACLE_BASE settings may have problems handling 2 ORACLE_BASE locations on a machine.

REMARK: The dbi-services tool DMK Management Kit can handle the situation with different ORACLE_BASE on a machine by specifying the ORACLE_BASE-location per database in separate sections in $DMK_HOME/etc/dmk.conf.

The following instructions will show the steps to move the diag- and admin-data of a database from an “old” ORACLE_BASE /u01/app/oracle to the “new” ORACLE_BASE /u01/app/odaorabase/oracle:

E.g. assume we have a Database CBLTEST which has an ORACLE_BASE /u01/app/oracle and a newly created database CBLTEST2 with an ORACLE_BASE /u01/app/odaorabase0:

[[email protected] log]# odacli list-databases
ID                                       DB Name    DB Type  DB Version           CDB        Class    Shape    Storage    Status        DbHomeID                                
---------------------------------------- ---------- -------- -------------------- ---------- -------- -------- ---------- ------------ ----------------------------------------
f9e51c56-fcd2-47a3-bcb4-56587a710f1e     CBLTEST    SI      false      OLTP     odb1     ASM        CONFIGURED   d9d1b8dd-4abc-46fe-aae4-d52162d66dab    
34fd593b-7586-41c9-a58d-71dfc0cf1d90     CBLTEST2   SI     true       OLTP     odb1s    ASM        CONFIGURED   4dda330d-feed-491b-bace-006c22b75672

After bringing CBLTEST to 19.13. with

# odacli update-dbhome -i d9d1b8dd-4abc-46fe-aae4-d52162d66dab -v

it has the following ORACLE_BASE-setting:

[email protected]:/home/oracle/ [CBLTEST] orabase

but the diagnostics-data still below the “old” ORACLE_BASE.

Here the steps to copy your diag- and admin-data for CBLTEST to the new ORACLE_BASE:

REMARK 1: The situation with Read-Only ORACLE_HOMEs is not covered here.
REMARK 2: Before doing this in production you should test this on a test system carefully. If in doubt open a Service Request with Oracle.

1. Change diagnostic_dest and the audit_file_dest in the spfile

sqlplus / as sysdba
SQL> alter system set diagnostic_dest='/u01/app/odaorabase/oracle' scope=spfile;
SQL> alter system set audit_file_dest='/u01/app/odaorabase/oracle/admin/CBLTEST/adump' scope=spfile;

2. Shutdown the DB

srvctl stop database -db CBLTEST

3. Copy the rdbms-diag-data to new ORACLE_BASE

cp -pR /u01/app/oracle/diag/rdbms/cbltest /u01/app/odaorabase/oracle/diag/rdbms

4. Copy the admin-directory to the new ORACLE_BASE

cp -pR /u01/app/oracle/admin/CBLTEST /u01/app/odaorabase/oracle/admin

5. Copy the audit-data for spillover-files from unified auditing.

cp -pR /u01/app/oracle/audit/CBLTEST /u01/app/odaorabase/oracle/audit

6. Change ORACLE_BASE to the new value and adjust your scripts, which do set ORACLE_BASE. E.g. for DMK adjust $DMK_HOME/etc/dmk.conf

export ORACLE_BASE=/u01/app/odaorabase/oracle

REMARK: You may check if the environment variable ORACLE_BASE has been stored in the Oracle Cluster registry:

[email protected]:/home/oracle/ [CBLTEST] srvctl getenv database -d CBLTEST -t "ORACLE_BASE"
PRKF-1128 : Environment variable ORACLE_BASE is not defined.

If it has been set (which would be very unusuable on an ODA) then you can overwrite it with

[email protected]:/home/oracle/ [CBLTEST] srvctl setenv database -d CBLTEST -t "ORACLE_BASE=/u01/app/odaorabase/oracle"
[email protected]:/home/oracle/ [CBLTEST] srvctl getenv database -d CBLTEST -t "ORACLE_BASE"

7. Startup the DB

srvctl start database -db CBLTEST

8. Check that everything is correct

8.1. Re-login as oracle, set the environment and connect “as sysdba”. Here with DMK sourced:

[email protected]:/home/oracle/ [rdbms191300] CBLTEST
********* dbi services Ltd. *********
STATUS                 : OPEN
OPEN_MODE              : READ WRITE
LOG_MODE               : ARCHIVELOG
FLASHBACK_ON           : NO
VERSION                :
CDB Enabled            : NO
[email protected]:/home/oracle/ [CBLTEST] echo $ORACLE_BASE
[email protected]:/home/oracle/ [CBLTEST] sqh

SQL*Plus: Release - Production on Fri Jan 21 20:51:48 2022

Copyright (c) 1982, 2021, Oracle.  All rights reserved.

Connected to:
Oracle Database 19c Standard Edition 2 Release - Production

SQL> select value from v$diag_info where value like '/u01%';


9 rows selected.

SQL> quit
Disconnected from Oracle Database 19c Standard Edition 2 Release - Production
[email protected]:/home/oracle/ [CBLTEST] cda
[email protected]:/u01/app/odaorabase/oracle/admin/CBLTEST/ [CBLTEST] ls -l
total 364
drwxr-x--- 2 oracle oinstall 20480 Jan 13 22:01 adump
drwxr-xr-x 2 oracle oinstall 20480 Jan 13 22:48 backup
drwxr-x--- 2 oracle oinstall 20480 Jan 13 12:27 dpdump
drwxr-xr-x 2 oracle oinstall 20480 Jan 13 18:01 etc
drwxr-xr-x 2 oracle oinstall 20480 Jan 13 22:48 log
drwxr-x--- 2 oracle oinstall 20480 Jan 13 12:29 pfile
drwxr-x--- 2 oracle oinstall 20480 Jan 13 12:23 xdb_wallet
[email protected]:/u01/app/odaorabase/oracle/admin/CBLTEST/ [CBLTEST] 

8.2. Check adrci

[email protected]:/home/oracle/ [CBLTEST] adrci

ADRCI: Release - Production on Fri Jan 21 19:51:30 2022

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

ADR base = "/u01/app/odaorabase/oracle"
adrci> show base
ADR base is "/u01/app/odaorabase/oracle"

–> The Base-setting in adrci is coming from the file $ORACLE_HOME/log/diag/adrci_dir.mif

9. Cleanup

If everything is correct, then you may delete the data from the “old” ORACLE_BASE:

rm -rf /u01/app/oracle/diag/rdbms/cbltest
rm -rf /u01/app/oracle/admin/CBLTEST
rm -rf /u01/app/oracle/admin/audit/CBLTEST


MOS Notes

How To Change The Value For ORACLE_BASE In The Inventory Of A 12.1 RDBMS Home (Doc ID 2010941.1)
orabase command returns no value instead of ORACLE_BASE value (Doc ID 2225573.1)