ORA-12514: TNS: The Listener currently cannot identify the Service requested in the connection Descriptor
When PL/SQL is connected to the Oracle database, the error "ORA-12514: TNS: The Listener currently cannot identify the Service requested in the connection descriptor" is reported.
Cause of this example:
When installing Oracle, the default instance is generally orcl, and it is found that someone did not play the cards according to the routine and changed the name,
Solution:
In the Oracle installation directory, find the listener. ora file path: D: \ oracle \ product \ 11.2.0 \ dbhome_1 \ NETWORK \ ADMIN
(Search by yourself) Modify:
# listener.ora Network Configuration File: D:\oracl\product\11.2.0\dbhome_1\network\admin\listener.ora# Generated by Oracle configuration tools.SID_LIST_LISTENER =(SID_LIST =(SID_DESC =(SID_NAME = CLRExtProc)(ORACLE_HOME = D:\oracle\product\11.2.0\dbhome_1)(PROGRAM = extproc)(ENVS = "EXTPROC_DLLS=ONLY:D:\oracle\product\11.2.0\dbhome_1\bin\oraclr11.dll"))(SID_DESC =(GLOBAL_DBNAME = JTW)(ORACLE_HOME = D:\oracle\product\11.2.0\dbhome_1)(SID_NAME = JTW)))LISTENER =(DESCRIPTION_LIST =(DESCRIPTION =(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))))
The red part is the added content, and JTW is the name of the listener instance.
Then modify (ADD) instantclient_11_2 \ network \ admin \ tnsnames. ora
MyOracle = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = jtw) ) )
Restart Oracle listening