I reckon you have a file that sets your environment e.g dn_env, grid_env etc. Make a copy of that and change all 10g references to 11g in the new file. Source the 11g environment using the new file and you should be able to run all commands. If not, set the variables again as you used to to be able to pick them up..... I hope this is what you are after!
Yes, I have .bash_profile (under linux_x64). My problem is that I have 10g R2 db and 11gR2 grid (clusterware). I have both $ORACLE_HOME/bin and $CRS_HOME/bin in my PATH.
So, when I try to run (for example) crsctl utility, it says:
my-oracle-home/bin/crsctl.bin: error while loading sharing libraries..
Seems to be it's trying to search for these libraries in deleted old crs home.. ?
Execute the below command at OS level and verify from which home is the crsctl utility is being called
Ensure that the above command is being called from the correct home
If the path from which crsctl utility is being called is the correct one, then perform starce on the crsctl command and verify the starce output to check if it truly is using 10g binaries or not
If not, then try unlocking and locking the GI binaries using "rootcrs.pl -unlock" (to unlock) and "rootcrs.pl -patch" (to lock the binaries), once done verify if you are still getting the same issue or not
Vandana - Oracle
You can use oraenv, which comes along with the installation itself, or you can have a user defined script in bash profile itself, where you can choose to set the environment based on the database your want to access.
execute oraenv as follows
and choose the env for the database to be set. (Please note, for oraenv to pickup and set the env appropriately the SID entry should be made into the oratab)
Vandana - Oracle