Requirement: In this post, I will describe some of the processes to get the ORACLE_HOME path. After we have the ORACLE_HOME path, then we will set how we can Set the ORACLE_HOME path.
Explanation: ORACLE_HOME is a directory name which will come at the time of Oracle software installation. The specified directory path of ORACLE_HOME directory is been stored in an environment variable. The ORACLE_HOME file will always used to ensure the correct oracle version is accessed running against the database.
Various ways to get the ORACLE_HOME path: There are multiple ways to get the ORACLE_HOME path. I will be describing here three different approaches to get the ORACLE_HOME path.
Approach 1: Please follow the steps as shown below:
- Open Command Prompt in Administrator mode
- Connect to the Oracle Database using the command sqs / as sysdba
- Execute the below code, and with that we will get the path of the ORACLE_HOME
SQL > var OHM varchar2(100); SQL > EXEC dbms_system.get_env('ORACLE_HOME', :OHM) ; SQL > PRINT OHM
Approach 2: On Windows Operating System we can also find ORACLE_HOME path in the registry.. For that please follow the steps as shown below:
- Run regedit
- Go to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraDB19Home1
- There against the ORACLE_HOME variable name we will ORACLE_HOME path
Approach 3: Open Command Prompt, type echo %ORACLE_HOME%. If ORACLE_HOME is set it will return you the path or else it will return %ORACLE_HOME%.
Set the ORACLE_HOME path: To set the ORACLE_HOME path follow the below steps
- Open System Properties and Click on Environment Variables.
Create the System Variable with Variable name as ORACLE_HOME as Variable value as C:\Softwares\WINDOWS.X64_193000_db_home
Hence, the solution to our requirement.
Thanks & Regards,
1,412 total views, 9 views today