well variables are easy to deal with. just use oraenv, a shell script which comes with oracle installations to switch to different environments