Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've got two (2) nodes in an Oracle RAC 11g in Windows Server 2008. Oracle software is installed in C:\app.

I realized that the ORACLE_HOME path has not been set.. In System Properties-> Advanced -> Environment Variables, I see that ORACLE_HOME is empty, and I need it in order to run some Oracle patch.

  • Which path would be the ORACLE_HOME: C:\app\bd\product\11.2.0\dbhome_1
  • Do I have to setup the same in both nodes?
share|improve this question

2 Answers 2

up vote 2 down vote accepted

Set the ORACLE_HOME to the directory which contains bin subdirectory with the Oracle binaries (utilities) you want to use. So in effect, e.g. sqlplus should be accessible as %ORACLE_HOME%\bin\sqlplus.exe.

Set your PATH correspondingly (include the same %ORACLE_HOME%\bin subdirectory).

It would be best to have the same ORACLE_HOME on all RAC nodes to avoid confusion, and this is the default. But it is not mandatory.

By the way, theoretically you can have a separate installation of Oracle binaries, and then you can change the ORACLE_HOME to point to them and run a separate Oracle instance using these separate binaries.

share|improve this answer

I added four lines to the to the four .bash_profile's on DR, now the oracle and grid environments are setup when you login.

Node 2:

[kendall3@napdclwcdb002b ~]$ sudo su - oracle
The Oracle base has been set to /opt/oracle
[oracle@napdclwcdb002b ~]$ env | grep ORA
ORACLE_SID=PWCM2
ORACLE_BASE=/opt/oracle
ORAENV_ASK=YES
ORACLE_HOME=/opt/oracle/product/PWCM/11.2.0

[kendall3@napdclwcdb002b ~]$ sudo su - grid
The Oracle base has been set to /opt/oracle/grid
[grid@napdclwcdb002b ~]$ env | grep ORA
ORACLE_SID=+ASM2
ORACLE_BASE=/opt/oracle/grid
ORAENV_ASK=YES
ORACLE_HOME=/opt/oracle/product/ASM/11.2.0.4

Node 1:

[kendall3@napdclwcdb001b ~]$ sudo su - oracle
The Oracle base has been set to /opt/oracle
[oracle@napdclwcdb001b ~]$ env | grep ORA
ORACLE_SID=PWCM1
ORACLE_BASE=/opt/oracle
ORAENV_ASK=YES
ORACLE_HOME=/opt/oracle/product/PWCM/11.2.0

[kendall3@napdclwcdb001b ~]$ sudo su - grid
The Oracle base has been set to /opt/oracle/grid
[grid@napdclwcdb001b ~]$ env | grep ORA
ORACLE_SID=+ASM1
ORACLE_BASE=/opt/oracle/grid
ORAENV_ASK=YES
ORACLE_HOME=/opt/oracle/product/ASM/11.2.0.4

[grid@napdclwcdb001b ~]$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
export ORACLE_SID=+ASM1
export ORAENV_ASK=NO
. oraenv
export ORAENV_ASK=YES
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.