Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2005
    Posts
    19

    Unanswered: How to set ORACLE_HOME

    I am running Oracle 10g on Linux .. I am trying to set Oracle Home.. any suggestions..

    Thanks

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool

    Customize the oraenv script or code an environment setting script like this example:
    Code:
    #!/bin/bash
    #########################################################
    # $ORABIN/o10g_env.ksh
    #########################################################
    # Set Environment variables for Oracle RDBMS version 10g
    #########################################################
    export  ORATOPDIR=/oracle
    export  ORACLE_BASE=$ORATOPDIR/dbserver
    export  ORACLE_HOME=$ORACLE_BASE/10.1.0.3
    export  JRE_HOME=$ORACLE_HOME/jre/1.4.2
    export  CLASSPATH=$JRE_HOME/lib:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACL
    E_HOME/plsql/jlib:$ORACLE_HOME/ord/jlib:$ORACLE_HOME/network/jlib:$ORACLE_HOME/o
    wm/jlib:$ORACLE_HOME/jdbc/lib:$ORACLE_HOME/ord/ts/jlib
    export  LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/jdbc/lib:$ORACLE_HOME/ctx/
    lib:$ORACLE_HOME/rdbms/lib:/usr/lib:/usr/X11R6/lib
    export  ORACLE_DOC=$ORACLE_HOME/doc
    export  TMPDIR=/tmp
    #########################################################
    # Set Path
    #########################################################
    if [[ $(echo $PATH|grep $ORACLE_HOME/bin|wc -l) -eq 0 ]]
    then
      export PATH=$ORACLE_HOME/bin:$PATH
    fi
    And add this line to the .bash_profile:
    Code:
    . /oracle/local/bin/o10g_env.ksh
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Sep 2004
    Location
    London, UK
    Posts
    565
    btw is it just me or is this (Oracle code, not LBK's) depressing:
    Code:
    if [[ $(echo $PATH|grep $ORACLE_HOME/bin|wc -l) -eq 0 ]]
    then
       export PATH=$ORACLE_HOME/bin:$PATH
    fi
    I guess Oracle are better at databases than at shellscripts.
    Last edited by WilliamR; 02-19-05 at 19:21.

  4. #4
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Angry

    Quote Originally Posted by WilliamR
    btw is it just me or is this (Oracle code, not LBK's) depressing:
    Code:
    if [[ $(echo $PATH|grep $ORACLE_HOME/bin|wc -l) -eq 0 ]]
    then
       export PATH=$ORACLE_HOME/bin:$PATH
    fi
    I guess Oracle are better at databases than at shellscripts.
    This code is Unix KSH, not Oracle and the purpose of that code is to prevent adding the $ORACLE_HOME to the $PATH variable evey time the script is executed by other scripts.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •