This post is also available in:
When attempting to start an Oracle database from an Oracle Home that was manually copied with cp -pR, the following error may appear:
$ srvctl start database -d mydb
PRCR-1079 : Failed to start resource ora.mydb.db
CRS-5017: The resource action "ora.mydb.db start" encountered the following error:
ORA-12777: A non-continuable error encountered. Check the error stack for
additional information [ksm_check_ob_paths:1], [ORACLE_BASE], [], [].
ORA-08275: Environment variable unset
CRS-2674: Start of 'ora.mydb.db' on 'node1' failedORA-12777 is a generic error — it means “non-continuable error”. But the real clue is on the next line: ORA-08275: Environment variable unset referencing ORACLE_BASE. This points directly to a specific file inside the Oracle Home: the orabasetab.
In this article, I’ll explain why this error occurs when copying an Oracle Home, what orabasetab is, how to fix it, and what other files may need adjustment.
💡 In practice: I encountered this error while trying to apply RU 19.26 to a database. After multiple failed attempts, I copied the 19.25 Oracle Home to a new 19.26 directory using
cp -pR, applied the patch, and tried to start the database on the new home. It wouldn’t start because theorabasetabstill pointed to the old home.
Why This Error Occurs
The Oracle Database needs to know where the Oracle Base is — the root directory for logs, audit, diag, and other runtime files. This information is stored in:
$ORACLE_HOME/install/orabasetabWhat is orabasetab
The orabasetab is a text file that maps the Oracle Home to the Oracle Base and the Home Name in the inventory. Format:
/u01/app/oracle/product/19.25.0.0/dbhome_1:/u01/app/oracle:Orasidb19c_home1:N:| Field | Value | Meaning |
|---|---|---|
| 1 | /u01/app/.../dbhome_1 | Oracle Home path |
| 2 | /u01/app/oracle | Oracle Base |
| 3 | Orasidb19c_home1 | Home name in the inventory |
| 4 | N | Read flag (N = normal) |
What happens when you copy the home
When you cp -pR an Oracle Home to another directory, all files are copied with their original content — including the orabasetab. The result:
- The new directory is
/u01/app/oracle/product/19.26.0.0/dbhome_1 - But the
orabasetabinside it still says:19.25.0.0/dbhome_1 - Oracle reads this file, can’t find the correct path, and fails with ORA-12777 + ORA-08275
Diagnosis
1. Check the full error
The error combination that identifies this scenario:
ORA-12777: ... [ksm_check_ob_paths:1], [ORACLE_BASE], [], []
ORA-08275: Environment variable unsetIf the ORA-12777 has different parameters (e.g., [ksbcti_child:8], [LOG_ARCHIVE_DEST]), the cause is different — this article doesn’t apply.
2. Check the orabasetab
bash
cat $ORACLE_HOME/install/orabasetabIf the first field doesn’t match the current $ORACLE_HOME, that’s the cause.
Example of the problem:
bash
# Current ORACLE_HOME
echo $ORACLE_HOME
# /u01/app/oracle/product/19.26.0.0/dbhome_1
# But orabasetab says:
cat $ORACLE_HOME/install/orabasetab
# /u01/app/oracle/product/19.25.0.0/dbhome_1:/u01/app/oracle:Orasidb19c_home1:N:
# ^^^^^^ old version!3. Check if the home is in the inventory
bash
cat /etc/oraInst.loc
# inventory_loc=/u01/app/oraInventory
cat /u01/app/oraInventory/ContentsXML/inventory.xml | grep -i "HOME NAME"If the new home isn’t listed in the inventory, it needs to be registered.
Solution
Step 1 — Register the new home in the inventory
Use runInstaller -attachhome to register the copied home in the Oracle Inventory:
bash
$ORACLE_HOME/oui/bin/runInstaller -attachhome \
ORACLE_HOME=/u01/app/oracle/product/19.26.0.0/dbhome_1 \
ORACLE_HOME_NAME=OraDB19Home_1926Note: Choose a unique
ORACLE_HOME_NAMEthat doesn’t conflict with existing homes in the inventory.
This command automatically updates:
- The Oracle Inventory (
inventory.xml) - The
orabasetabinside the new home
Step 2 — Verify the updated orabasetab
bash
cat /u01/app/oracle/product/19.26.0.0/dbhome_1/install/orabasetabExpected result:
/u01/app/oracle/product/19.26.0.0/dbhome_1:/u01/app/oracle:OraDB19Home_1926:N:The first field now points to the correct home.
Step 3 — Start the database
bash
srvctl start database -d mydbStep 4 — Validate
bash
# Check processes
ps -ef | grep pmon
# Check via srvctl
srvctl status database -d mydbWhat Else Can Be Wrong After cp -pR
Copying an Oracle Home with cp -pR is a practice not recommended by Oracle. Besides orabasetab, other files may contain hardcoded paths from the old home:
| File | What to check |
|---|---|
$ORACLE_HOME/install/orabasetab | Oracle Home path (fixed above) |
$ORACLE_HOME/network/admin/listener.ora | ORACLE_HOME parameter in SID_LIST |
$ORACLE_HOME/network/admin/tnsnames.ora | Paths if there are local references |
$ORACLE_HOME/network/admin/sqlnet.ora | Wallet paths, logs |
/etc/oratab | Database entry pointing to the correct home |
$ORACLE_HOME/dbs/init<SID>.ora / spfile | Parameters with absolute paths |
$ORACLE_HOME/install/oraInst.loc | Inventory reference |
Quick check:
bash
# Search for old home references in all configs
grep -r "19.25.0.0" $ORACLE_HOME/network/admin/ <strong>2</strong>>/dev/null
grep -r "19.25.0.0" $ORACLE_HOME/dbs/ <strong>2</strong>>/dev/null
grep "19.25.0.0" /etc/oratabAdjust any references found to the new path.
Other Common Causes of ORA-12777
ORA-12777 is an umbrella error that can have multiple causes. If your scenario doesn’t involve copying an Oracle Home, check:
ORACLE_BASEnot defined in the environment — export in.bash_profile- Incorrect permissions on Oracle Home or Oracle Base —
chown -R oracle:oinstall - Corrupted Oracle Home — re-clone or reinstall
- CRS/Grid Infrastructure issues — check
ohasd_oraagentlogs - Inconsistent environment variables — compare
envwith expected values
The detailed log is always at:
bash
cat /u01/app/oracle/diag/crs/<hostname>/crs/trace/ohasd_oraagent_oracle.trcCorrect Method for Cloning an Oracle Home
Instead of cp -pR, use Oracle’s supported method:
bash
# 1. Copy the files
cp -pR /u01/app/oracle/product/19.25.0.0/dbhome_1/* /u01/app/oracle/product/19.26.0.0/dbhome_1/
# 2. Register in the inventory (MANDATORY)
cd /u01/app/oracle/product/19.26.0.0/dbhome_1/oui/bin
./runInstaller -clone -waitForCompletion \
ORACLE_HOME=/u01/app/oracle/product/19.26.0.0/dbhome_1 \
ORACLE_HOME_NAME=OraDB19Home_1926 \
ORACLE_BASE=/u01/app/oracle
# 3. Run root.sh
sudo /u01/app/oracle/product/19.26.0.0/dbhome_1/root.shThe -clone option handles updating orabasetab, the inventory, internal paths, and executes the necessary relinks.
Quick Diagnostic Checklist
bash
# 1. Does the error contain [ORACLE_BASE] and ORA-08275?
# If yes → orabasetab issue
# 2. Check orabasetab
cat $ORACLE_HOME/install/orabasetab
# 3. Does the first field match $ORACLE_HOME?
echo $ORACLE_HOME
# 4. Is the home in the inventory?
cat /u01/app/oraInventory/ContentsXML/inventory.xml | grep -i "home name"
# 5. Search for old paths
grep -r "OLD_VERSION" $ORACLE_HOME/network/admin/ /etc/oratab $ORACLE_HOME/dbs/Conclusion
The ORA-12777 error with ORA-08275: Environment variable unset [ORACLE_BASE] is caused by an outdated orabasetab — almost always the result of copying an Oracle Home with cp -pR without registering the new home in the inventory.
The diagnosis is straightforward:
- Check if the error contains
[ORACLE_BASE]+ORA-08275 - Compare the
orabasetabwith the current$ORACLE_HOME - Register the home in the inventory with
runInstaller -attachhome - Verify the
orabasetabwas updated - Review other files with old home paths (listener.ora, oratab, etc.)
- Start the database and validate
For future Oracle Home clones, use runInstaller -clone instead of cp -pR — it’s the supported method and avoids this type of issue.
References:
