When you work with Oracle Database, it’s very helpful to know where Oracle keeps its key files and folders. These directories contain important data like configuration files, logs, backups, and scripts that keep the database running smoothly.
Let’s look at the 10 most important Oracle directories and what they’re used for 👇
1️⃣ $ORACLE_HOME
This is the main Oracle installation directory.
It contains all the binaries, executables, and configuration files required for the database to run.
Example path:
/u01/app/oracle/product/19.0.0/dbhome_1
2️⃣ $ORACLE_BASE
This is the root directory under which all Oracle software and databases are installed.
It usually contains folders like: product (software versions), diag (diagnostics/logs) etc.
Example:
/u01/app/oracle
3️⃣ $ORACLE_HOME/dbs (on Unix/Linux) or %ORACLE_HOME%\database (on Windows)
This directory stores important initialization parameter files such as:
init.oraorspfile.ora– database startup parameters- Password files – for sysdba authentication
4️⃣ $ORACLE_HOME/network/admin
This folder contains all network configuration files used for connectivity.
Key files include:
tnsnames.ora– defines database connection nameslistener.ora– listener configurationsqlnet.ora– client network settings
5️⃣ $ORACLE_BASE/diag
This is the diagnostic directory where Oracle stores logs, traces, and dumps for troubleshooting. It includes alert logs, trace files, and incident reports.
Example path:
/u01/app/oracle/diag/rdbms/orcl/orcl/
6️⃣ $ORACLE_HOME/bin
This directory contains all Oracle executable files — the commands and tools you run.
Examples:
sqlplus
rman
expdp / impdp
lsnrctl
7️⃣ $ORACLE_HOME/rdbms/admin
This folder contains SQL scripts used by Oracle for creating and maintaining the database.
Examples:
catalog.sql– creates data dictionary viewscatproc.sql– runs PL/SQL packagesutlrp.sql– recompiles invalid objects
8️⃣ $ORACLE_HOME/inventory or /u01/app/oraInventory
This is the Oracle Inventory directory, which tracks all Oracle products installed on the system.
It’s used by the Oracle Universal Installer (OUI) to check existing installations and versions.
9️⃣ $ORACLE_HOME/opatch
This directory contains the OPatch utility, which is used to apply or rollback patches to your Oracle software.
Example command:
$ORACLE_HOME/OPatch/opatch lsinventory
🔟 $ORACLE_HOME/log or $ORACLE_BASE/admin/<DB_NAME>/adump
These folders store log and audit files:
alert.log— records database startup, shutdown, and errorsadump— stores audit trail files for user activities
Example:
/u01/app/oracle/admin/orcl/adump
Final Thoughts
Understanding these directories makes it much easier to manage and troubleshoot your Oracle Database.
Here’s a quick summary:
| Purpose | Directory |
|---|---|
| Oracle installation | $ORACLE_HOME |
| Base folder | $ORACLE_BASE |
| Init files | $ORACLE_HOME/dbs |
| Network config | $ORACLE_HOME/network/admin |
| Logs & diagnostics | $ORACLE_BASE/diag |
| Executables | $ORACLE_HOME/bin |
| Scripts | $ORACLE_HOME/rdbms/admin |
| Inventory | /u01/app/oraInventory |
| Patches | $ORACLE_HOME/OPatch |
| Audit logs | $ORACLE_BASE/admin/<DB_NAME>/adump |