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?
I presume you have all 5 databases running from 1 oracle home?
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
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.
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.
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.
Life is a journey, not a destination!
SAM you got my point. Can any of you guys show me how a sample script to do this would look like?
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.
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 ?
I guess I'm just missing the point. Sam, it's all yours...
Click Here to Expand Forum to Full Width