Hi Marco/Hilarion,
I tried merging only the tnsnames.ora(copied 11g tnsdata into 10g tnsdata) and then opened PLSQL Developer. Now in database combo both 10g and 11g DB names are listing and successfully connecting. Thnx a lot for helping me.
By the way, I just want to share some info about connecting 10g and 11g which I noticed while doing trial and errors.
Firstly, I installed 10g. A path value referencing to the BIN folder of the installed DB is appended to the environmental variable PATH.
Before Installing 10g: PATH variable contains
C:\Program Files\Java\jdk1.7.0_45\bin;C:\Program Files\TortoiseSVN\bin;
After Installing 10g: PATH variable contains
C:\Program Files\Java\jdk1.7.0_45\bin;C:\Program Files\TortoiseSVN\bin;D:\oracle\10g\app\oracle\product\10.2.0\server\bin;
Here, I am able to connect to 10g through sqlplus and PLSQL Developer.
Now, I installed 11g : PATH variable contains
D:\oracle\11g\product\11.2.0\dbhome_1\BIN;C:\Program Files\Java\jdk1.7.0_45\bin;C:\Program Files\TortoiseSVN\bin;D:\oracle\10g\app\oracle\product\10.2.0\server\bin;
Here, sqlplus and PLSQL Developer refers to only 11g but not 10g.
sqlplus sys/*** will connect to 11g.
PLSQL Developer will list only 11g DB name in its combo.
Even,i tried to connect to 10g through sqlplus by giving sys/***@XE
But I got the below error
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
Reason is 11g BIN path is first placed in the Environment varaible PATH.
Then I Uninstalled 10g: PATH variable contains
D:\oracle\11g\product\11.2.0\dbhome_1\BIN;C:\Program Files\Java\jdk1.7.0_45\bin;C:\Program Files\TortoiseSVN\bin;
sqlplus and PLSQL Developer connects to 11g fine.
Then I Installed 10g: PATH variable contains
D:\oracle\10g\app\oracle\product\10.2.0\server\bin;D:\oracle\11g\product\11.2.0\dbhome_1\BIN;C:\Program Files\Java\jdk1.7.0_45\bin;C:\Program Files\TortoiseSVN\bin;
Here, sqlplus and PLSQL Developer refers to only 10g but not 11g.
sqlplus sys/*** will connect to 10g.
PLSQL Developer will list only 10g DB name in its combo.
Even,i tried to connect to 11g through sqlplus by giving sys/***@11gdb
But I got the below error
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified.
Then I merged the tnsnames.ora(copied 11g tnsdata into 10g tnsdata).
Now sqlplus and PLSQL Developer connects to both.
Conclusion : SQLPlus looks only the tnsnames.ora file of the Oracle client which is first placed in the PATH environment variable. If that tnsnames.ora file is merged with the data of the other oracle client, it will connect to both. If we install a new DB, its BIN path will be prefixed to the PATH variable and it would get preference.