Question: I have an Oracle 10g and an Oracle
11g database on my Windows box and I want to be able to adjust my environment so
that I can run either 10g or 11g. How do you switch the environmental
variables on a Windows server?
has a "home selector" feature to allow you to change the
environment between multiple $ORACLE_HOME directories, but
is is just as easy to create a bat file for each oracle
version to set the appropriate environment and execute it
before executing sqlplus.
The key for accessing SQL*Plus is to have the
$ORACLE_HOME/bin directory highest in the PATH and that will
pick-up the appropriate release of Oracle.
Also see these notes on using multiple
registry values for different releases of Oracle
is an example script to allow you to switch between Oracle
10g and Oracle 11g on a Windows box: