Listener refused the connection with the following error
When testing the connection to my oracle database I get the following error
Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
The Connection descriptor used by the client was: //localhost:1521/orcl
Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
The Connection descriptor used by the client was: //localhost:1521/orcl
One answer
I checked ...Oracle\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora and it turns out I had installed my service to use the fully qualified name (orcl.ibm.com)
I changed //localhost:1521/orcl to //localhost:1521/orcl.ibm.com and was able to connect.
here is what the tnsnames.ora file has in it:
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.ibm.com)
)
)
I changed //localhost:1521/orcl to //localhost:1521/orcl.ibm.com and was able to connect.
here is what the tnsnames.ora file has in it:
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.ibm.com)
)
)