Oracle Linux

How to Set ORACLE_HOME in Oracle?

You must have heard the term “ORACLE_HOME” while working with Oracle. The “ORACLE_HOME” is the root directory where all Oracle software is installed in the system. You can have different versions of Oracle in your system so it is necessary to set the correct environment variable. The environment variable “ORACLE_HOME” points to the root directory of the Oracle software version which should be accessed while running the database.

This post will discuss:

Prerequisites: Check if ORACLE_HOME is Already Set

To see if the “ORACLE_HOME” environment is set in the Windows system or not. For that purpose, open the Command Prompt and type this command given below:

echo %ORACLE_HOME%

If you have not seen the version in the output, it means your environment variable is not set:

Let’s set the ORACLE_HOME in your Windows.

How to Configure/Set ORACLE_HOME in Oracle?

To set the “ORACLE_HOME”, open the Start menu and search “Environment”. In the “Edit system environment variables” click on the “Open” button:

A new wizard will open, click on the “Environment Variables” button:

Add a new system variable for adding the ORACLE_HOME environment variable by pressing the “New” button:

Type “Variable name” as “ORACLE_HOME” and “Variable value” as the path of the desired version Oracle directory. Click on the “OK” button:

As a result, the Environment variable will be created successfully:

Moreover, the environment variable can be edited or deleted by clicking on the “Edit” or “Delete” button:

After setting the “ORACLE_HOME” variable in the system, Let’s see how you can verify if it is set successfully or not.

Verification

To verify if the ORACLE_HOME environment variable is set successfully or not, open the Command Prompt and type the given below command:

echo %ORACLE_HOME%

The output is showing the location which you set while creating the environment variable:

It can be observed that we have set the ORACLE_HOME environment variable in your system.

Conclusion

To set “ORACLE_HOME”, open the “System Properties” and press the “Environment Variables” button. Add a new system variable by typing “ORACLE_HOME” in the “Variable name” and the path of the Oracle root directory in the “Variable value”, and click “OK”. This post demonstrated the procedure for setting the ORACLE_HOME environment variable.

About the author

Sharqa Hameed

I am a Linux enthusiast, I love to read Every Linux blog on the internet. I hold masters degree in computer science and am passionate about learning and teaching.