Unix/oracle problem
DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Unix/oracle problem

  1. #1
    Join Date
    Feb 2001
    Posts
    32

    Exclamation

    I have just upgraded 1 database out of 5 databases from 8.1.5 to 8.1.7.
    My environmental variable points to all the 5 databases.
    I need to change the environmental variable(to 8.1.7) to point to only the upgraded database.
    Can I get some help on how to do that?

    Currently, the way the environmental variable is set up, if I change it to 8.1.7, it's going to affect the databases running in 8.1.5 as well as the one running in 8.1.7. And if that happens, the ones in 8.1.5 will not be up when the server is started.
    Can any one give me specific ideas on how to change the environmental variable for only the upgraded database(the 8.1.7) without it affecting the rest of the rdatabases running in 8.1.5?


    thanks,
    Tee

  2. #2
    Join Date
    Mar 2001
    Posts
    18
    I presume you have all 5 databases running from 1 oracle home?

    Dave

  3. #3
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,095
    I'm not really sure what your concern is with the environment variables as long as they were setup in different $ORACLE_HOMEs. If the variables are setup correctly when the database starts, they will be fine. Otherwise,
    1. make sure your oratab file is setup correctly. On solaris, it's in /var/opt/oracle/oratab
    2. if you are a csh user, source the coraenv script in $ORACLE_HOME/bin. If you are a ksh user, source oraenv in $ORACLE_HOME/bin
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  4. #4
    Join Date
    Feb 2001
    Posts
    32
    The oratab file is fine.
    This is the old ORACLE_HOME /u01/app/oracle/product/8.1.5
    This is the new ORACLE_HOME /u01/app/oracle/product/8.1.7.
    You see we log on as oracle to get to the server. The env variable does not point to just one database. It points to all the databases.
    So if it is modified to 8.1.7, it's going to affect all the databases. I want to modify it to change the env variable for just one database.

  5. #5
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,095
    When you login, source the appropriate envirnment file to setup your envrionment. The oraenv script will ask you which SID you want to work with. When you choose the 817 SID, it will setup your environment for the 817 database. When you choose an 815 SID, it will setup the 815 environment.

    To see exactly what environment variables are being modified, look in the oraenv script. It will show you things like ORACLE_HOME, ORACLE_SID, TNSADMIN, ORACLE_BASE, etc. Thes are the variables needed to modify your environment if you want to write your own script.
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  6. #6
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    I thing I ge tthe point of Tee, is it an issue that you worry about when you have to restart the server and your dbstart gets executed. I think, the dbstart/dbstop scripts have the environment check being performed internally and would start/stop those instances appropriately.

    To set up your local env, as Jeff syggested, you can put a small shell script that would ask you for the SID and then you could do a validation with the oratab file and then you could invoke the appropriate oraenv script.

    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


  7. #7
    Join Date
    Feb 2001
    Posts
    32
    SAM you got my point. Can any of you guys show me how a sample script to do this would look like?

    Thanks,
    Tee

  8. #8
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,095
    Look in your $ORACLE_HOME/bin directory for dbstart and dbshut scripts. These scripts are already written and will setup the appropriate environment when invoked. I typically use the dbstart/dbshut from the LATEST version, 817 in your case.
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  9. #9
    Join Date
    Feb 2001
    Posts
    32
    I already dbstart and the dbshut scripts. Those are the scripts that starts the database when the server is started.

    I think SAM understands my problem.
    My problem is that the way my env varaible is set up, if I change it to point to 8.1.7(which I should because I have upgraded one database) only the 8.1.7 database will be up. The ones in 8.1.5 will not be up regardless if they in the oratab file or not because the env variable is pointing to 8.1.7 ?


  10. #10
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,095
    I guess I'm just missing the point. Sam, it's all yours...
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

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