mercredi 7 janvier 2015

ORA-12154 TNS:could not resolve service name from PL/SQL, but SQL Developer Connects Fine


I'm totally new to the world of Oracle. I've got PL/SQL Developer installed on my machine, and able to access client databases on other servers. I installed Oracle 11g express on my machine to try to learn and play with commands in my own environment. I then installed Oracle SQL Client and the 32-bit JDK and now I can connect with SQL Developer using a tnsnames.ora file that has my XE database defined (apparently XE is the default instance/database when you install 11g express).


SO I can connect to XE with SQL Plus and Oracle SQL Developer, but PL/SQL Developer always gives me the error "ORA-12154 TNS:could not resolve service name from PL/SQL".


From RegEdit, my ORACLE_HOME points here: C:\oraclexe\app\oracle\product\11.2.0\server.


I think I can prove that PL/SQL Developer is using this file. c:\oracle\ora81\network\ADMIN\TNSNAMES.ORA I added XEDUMMY2 to that file, XEDUMMY2 shows up in the combo box.


I added XEDUMMY1 to this file: c:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN\tnsnames.ora (which seems to be the one in the ORACLE_HOME directory.


The trick doesn't seem to work in Oracle SQL Developer, because there is no select list, and I get same error whether I type in XEDUMMY1 or XEDUMMY2


So how can I connect with PL/SQL Developer?





Aucun commentaire:

Enregistrer un commentaire