In my previous article i have given the detailed description of multiple queries related to oracle. In this article i would like to throw light on – How to set oracle_home path? I will explain multiple steps for setting up the oracle_home path.We often use the oracle_home in detail. In this post i would like to cover the following topics in detail.
Once you install the Oracle.We require to check ORACLE_HOME file is set or not. We require to set the ORACLE_HOME .
There are so many questions in mind that what is exact path of ORACLE_HOME file.We require to check whether the ORACLE_HOME is set or not.
c:\>echo %ORACLE_HOME%
C:\oraclexe\app\oracle\product\11.1.0.6\server
If the path is given below (The version name may be different). If ORACLE_HOME is not set then you require to set the ORACLE_HOME.
C :\> echo %ORACLE_HOME%%ORACLE_HOME
We require to set the ORACLE_HOME for Windows server ,
C:\>set ORACLE_HOME=C:\oraclexe\app\oracle\product\11.1.0.6\server
C:\>echo %ORACLE_HOME%C:\oraclexe\app\oracle\product\11.1.0.6\server
C:\>
Step 1 : Go to the Control Panel –> System –> Advanced
Step 2 :We require to create on button named “Environment Variables”. There are two set of variables – first is User and other is System variables.The user variables are the variables which are visible to anyone who has logged in to the system. The system variables are visible to any other person who uses the system.
Step 3:Depending on the visibility you require to create ORACLE_HOME variable by clicking on New button.
Step 4 : We require to set the ORACLE_HOME directory value and Save it.
Step 5: We require to verify it with new command line session,
You can also check and set the ORACLE_HOME path on unix or linux server. The first step is to check the ORACLE_HOME.
Command to use :
env | grep ORACLE_HOME
If the path is not set then you will get the following error.
SQL> @%ORACLE_HOME%\RDBMS\ADMIN\SCOTT.sqlSP2-0310: unable to
open
file "%ORACLE_HOME%\RDBMS\ADMIN\SCOTT.sql"
If you get above error then you require to set the ORACLE_HOME using following Steps.
Step 1 : Open the linux/unix operating system command prompt.
Step 2 : Use following commands to set the ORACLE_HOME and ORACLE_SID are set properly.
Command 1 : (bash or ksh) export ORACLE_SID=orcl
Command 2 :csh or tcsh) setenv ORACLE_SID orcl
You can set these with the scripts coraenv
(for the C shell) and oraenv
(for other shells). These scripts are typically located in the /usr/local/bin
directory.
Step 3 : Check and Ensure that the ORACLE_HOME/BIN directory in environment variable path.
Step 4 : Command to use,
export ORACLE_HOME=/app/oracle/product/11.1.0.6/server
There is need to edit or delete the ORACLE_HOME. These kind of situation occurs when there is need to install multiple oracle installations. You require to follow the same steps and only you need to click on Edit or Delete button accordingly in Windows.
In Linux system also you can also edit profile file for your default shell in home directory. Example : /home/oracle , so that these environment variables are set every time you log in as that user.
I hope you get clear idea about – How to set oracle_home path? in detail .If you like this article or if you have any issues with the same kindly comment in comments section.
In my previous article I have given details about application support engineer day to day…
In my previous articles I have given the roles and responsibilities of L1,L2 and L3…
In my previous articles i have given the hierarchy of production support in real company…
In this article i would like to provide information about production support organization structure or…
In my previous article I have given roles for L1 and L2 support engineer with…
I have started this new series of how to become application support engineer. This article…