Sample Header Ad - 728x90

Unable to connect to pluggable database using TNS but EZCONNECT is OK

0 votes
1 answer
3260 views
I installed oracle 12c pn windows following the defaults settings... I end up with ORCL and ORCLPDB... I can connect to ORCLPDB using EZCONNECT via CONN system/password@//localhost:1521/ORCLPDB . Then I added a service name in my tnsnames.ora like this : ORCLPDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orclpdb) ) ) But when I try connect system/password@ORCLPDB I get the following error : >ORA-12154: TNS:could not resolve the connect identifier specified This is strange because lsnrctl services has the following entry : >Service "orclpdb" has 1 instance(s). Instance "orcl", status READY, has 1 handler(s) for this service... Handler(s): "DEDICATED" established:0 refused:0 state:ready LOCAL SERVER What should I do ?
Asked by Kurt Miller (111 rep)
Dec 17, 2017, 08:48 PM
Last activity: May 25, 2018, 09:16 AM