July 24th, 2012, 12:14 PM
-
Oracle Installation Questions
As I finalize my Oracle 11g R2 (11.2.0.3) database installation on RHEL 6.3 Linux, I have some questions I wasn't able to find in the documentation:
1. The documentation advise you to configure the 'oracle' users home environment variables but I'm not 100% on exactly what MUST be present in .bash_profile in order to make sure Oracle is running as expected. Right now I only have:
Code:
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db1
ORACLE_SID=cpm
Are there any other environment variables that are "required" for the 'oracle' user? The documentation do not instruct me to add or do so however I think I'm missing:
TMP=
TMPDIR=
TNS_ADMIN=
Do I need to manually set them and if so, how do I determine those variables and where are they expressed? I'm going to assume in .bash_profile with the other variables but I'm not making ANY assumptions.
2. Where the OUI, it prompts you for the local 'bin' directory and already suggests /usr/local/bin as the path but I'm not sure if Oracle is looking for $ORACLE_HOME/bin or the O.S. bin directory. Can someone please tell me which 'bin' folder Oracle database is expecting here? The documentation doesn't even discuss this little aspect of the installer and I'm confused. Assuming O.S. bin folder as it suggests but not 100%.
July 24th, 2012, 02:11 PM
-
Originally Posted by CarlosinFL
...etc ...
Are there any other environment variables that are "required" for the 'oracle' user? The documentation do not instruct me to add or do so however I think I'm missing:
TMP=
TMPDIR=
TNS_ADMIN=
Suggestion: use the oracle supplied "oraenv" scripts to set the environment.
Code:
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=cpm
export ORAENV_ASK=NO
. /usr/local/bin/oraenv
export ORAENV_ASK=YES
export ORACLE_UNQNAME=${ORACLE_SID} #<= Set the db unique name.
export TNS_ADMIN=$ORACLE_HOME/network/admin
# Other useful variables:
export EDITOR=/usr/bin/vim
export TMPDIR=/tmp
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export NLS_DATE_FORMAT='DD-Mon-YYYY HH24:MI:SS'
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
Originally Posted by CarlosinFL
2. Where the OUI, it prompts you for the local 'bin' directory and already suggests /usr/local/bin as the path but I'm not sure if Oracle is looking for $ORACLE_HOME/bin or the O.S. bin directory. Can someone please tell me which 'bin' folder Oracle database is expecting here? The documentation doesn't even discuss this little aspect of the installer and I'm confused. Assuming O.S. bin folder as it suggests but not 100%.
Just take the default, Oracle will copy to /usr/local/bin the scripts that set the Oracle environment.
July 25th, 2012, 02:16 PM
-
Originally Posted by LKBrwn_DBA
Suggestion: use the oracle supplied "oraenv" scripts to set the environment.
Code:
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=cpm
export ORAENV_ASK=NO
. /usr/local/bin/oraenv
export ORAENV_ASK=YES
export ORACLE_UNQNAME=${ORACLE_SID} #<= Set the db unique name.
export TNS_ADMIN=$ORACLE_HOME/network/admin
# Other useful variables:
export EDITOR=/usr/bin/vim
export TMPDIR=/tmp
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export NLS_DATE_FORMAT='DD-Mon-YYYY HH24:MI:SS'
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
So you're saying I should copy this into a file and save it w/ a .sh file extension & run it? Or is this mentioned above script already pre-packaged in RHEL or OEL Yum mirrors?
July 26th, 2012, 10:16 AM
-
Originally Posted by CarlosinFL
So you're saying I should copy this into a file and save it w/ a .sh file extension & run it? Or is this mentioned above script already pre-packaged in RHEL or OEL Yum mirrors?
The "/usr/local/bin/oraenv" is not part of RHEL, but it's installed by the "root.sh" scripts when you install Oracle software.
You can put all those commands as part of the .bash_profile file or into separate script.
August 17th, 2012, 02:32 AM
-
.bash_profiel setting
Originally Posted by CarlosinFL
As I finalize my Oracle 11g R2 (11.2.0.3) database installation on RHEL 6.3 Linux, I have some questions I wasn't able to find in the documentation:
1. The documentation advise you to configure the 'oracle' users home environment variables but I'm not 100% on exactly what MUST be present in .bash_profile in order to make sure Oracle is running as expected. Right now I only have:
Code:
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db1
ORACLE_SID=cpm
Are there any other environment variables that are "required" for the 'oracle' user? The documentation do not instruct me to add or do so however I think I'm missing:
TMP=
TMPDIR=
TNS_ADMIN=
Do I need to manually set them and if so, how do I determine those variables and where are they expressed? I'm going to assume in .bash_profile with the other variables but I'm not making ANY assumptions.
2. Where the OUI, it prompts you for the local 'bin' directory and already suggests /usr/local/bin as the path but I'm not sure if Oracle is looking for $ORACLE_HOME/bin or the O.S. bin directory. Can someone please tell me which 'bin' folder Oracle database is expecting here? The documentation doesn't even discuss this little aspect of the installer and I'm confused. Assuming O.S. bin folder as it suggests but not 100%.
========================================
copy this and paste this in your .bash_profile....
//
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/; export ORACLE_HOME
ORACLE_SID=PROD; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
#LD_ASSUME_KERNEL=2.4.1; export LD_ASSUME_KERNEL
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
//
for more info go through http://www.appsdbatraining.com & http://www.fusionappsdba.com.....