#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Posts
    56
    Rep Power
    3

    Question 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%.
  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2006
    Posts
    850
    Rep Power
    387

    Cool


    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.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Posts
    56
    Rep Power
    3
    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?
  6. #4
  7. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2006
    Posts
    850
    Rep Power
    387
    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.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    1
    Rep Power
    0

    .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.....

IMN logo majestic logo threadwatch logo seochat tools logo