DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Multiple homes in unix

  1. #1
    Join Date
    Jun 2001
    Location
    NY
    Posts
    226
    Dear members

    I have oracle8i and 8.0.5 installed on different multiple homes in a tru64 unix box. How can I leisurely switch between both homes?

    Thanks in advance.
    roukie-dba

  2. #2
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    switching between versions just means changing ORACLE_HOME, ORACLE_SID and PATH env variables, so just make a script which manages that for you ...

  3. #3
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938
    ... for example:

    $ORACLE_SID = DB_5
    $export ORACLE_SID

    verify with:

    $echo $ORACLE_SID


  4. #4
    Join Date
    Oct 2001
    Posts
    83
    Hello,

    You can create a shell script in order to swtich from a ORACLE_HOME to another (depending of the chosen ORACLE_HOME when the script is invoked, you put the env variables...)

    Hope this helps

  5. #5
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    no, no, changing ORACLE_HOME is not enough !!
    if you don't change your PATH, you'll face some major problems )

    note that you might also need to change ORACLE_SID, LD_LIBRARY_PATH, and some other variables like this ...

  6. #6
    Join Date
    Jan 2000
    Location
    Silver Spring MD USA
    Posts
    105
    The Unix user should have a .profile or .cshrc(?) that defines your environment variables.
    You can have one for each $ORACLE_HOME like
    .profile805 and .profile8i
    Edit each to reflect each environment properly, so each mention of ORACLE_HOME is properly defined. (in PATH, LD_LIBRARY_PATH, etc.) And ORACLE_SID is properly set.
    When you want to use 8i environment, cd to $HOME and do
    . ./.profile8i

    Just don't get confused and try to start an 8i database in 8.0.5 environment. You could corrupt the database.

  7. #7
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    This is the whole purpose for the oraenv file. If you use ksh, source the oraenv file and specify the ORACLE_SID you want to work with. The oraenv file will take care of the rest. If you use cshrc, source coraenv instead.
    Jeff Hunter

  8. #8
    Join Date
    Jun 2001
    Location
    NY
    Posts
    226
    Thanks for all the input, great help!!!

    Roukie
    roukie-dba

  9. #9
    Join Date
    Jun 2001
    Location
    NY
    Posts
    226

    more problems

    I created another .profile file (.profile805) specifying the 805 environment parameters. However, when I sourced the .profile805 parameter, my new environment echoed $ORACLE_BASE, $ORACLE_SID and $ORACLE_HOME variables with their proper values. However, when I type "env" at the prompt to display my environment variables, my path variable "PATH" shows entries for the 8i .profile file in effect. This of course is causing problems activating any 8.0.5 executables such as SQLPLUS .... Please, any suggestions???

    Following is the error output I am getting when trying to execute sqlplus

    $ sqlplus
    ERROR:
    ORA-00600: internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s],
    [%s], [%s]


    SP2-0152: ORACLE may not be functioning properly

    SQL*Plus: Release 8.1.7.0.0 - Production on Fri Dec 14 11:57:18 2001

    (c) Copyright 2000 Oracle Corporation. All rights reserved.

    $
    roukie-dba

  10. #10
    Join Date
    Jan 2000
    Location
    Silver Spring MD USA
    Posts
    105
    oranev would be a more effective way to do this.

    Having said that, I suspect that in your .profile805, PATH comes before ORACLE_HOME and it includes a line like:

    PATH=$ORACLE_HOME/bin:/usr/local/bin.....

    Since $ORACLE_HOME is getting reset AFTER PATH, it takes the old $ORACLE_HOME value for the PATH. Either set PATH with explicit path for desired ORACLE_HOME or put it AFTER ORACLE_HOME

Posting Permissions

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


Click Here to Expand Forum to Full Width