Set ORACLE_HOME Environment variable [2024]
Set ORACLE_HOME environment variable.
This tutorial will teach us how to set the ORACLE_HOME environment variable on Windows 10. This variable should point to the location of the Oracle Database on the machine. We can set this variable after the Oracle database is installed.
For example, if the Oracle base install location is installed on c:\oracle, then we need to set this variable to:
ORACLE_HOME=C:\oracle
Oracle Install on Windows:
Check if the variable is set:
Open the command prompt and issue the following command.
\> echo %ORACLE_HOME%
The variable is not set on the machine if we see the same name displayed on the screen instead of the real directory path.
Set ORACLE_HOME
Let’s see the steps to set the variable on Windows.
Type the following “system environment variables” in the Search Bar.
Click on the ‘Edit the system environment variables’Â Control Panel search result.
In the System Properties window, choose the Advanced tab. Click on the Environment Variables… button.
In the System Variables section, click on the New… button.
Add the environment variable.
For example, type the following to set C:\oracle as the Oracle home.
Variable name: -> ORACLE_HOME
Variable value: -> C:\oracle
Click on the OK button. Alternatively, we can choose the install folder by clicking on the Browse Directory… button.
Append to PATH
Locate the PATH system variable. Double-click on it to edit the variable. Click on the New button.
Add the bin directory to the PATH variable.
%ORACLE_HOME%\bin
Verify
Open the command prompt and issue the following echo command to verify that the variable is set.
\> echo %ORACLE_HOME%
That’s it. The environment variable has been set on the Windows machine.
Video Tutorial
—
Database Tutorials on this website:
More information about Oracle Database: