Oracle Error: ORA-12154: TNS: could not resolve the connect identifier specified

3k Views Asked by At

I am new in oracle. I am using windows 10 64 bit, Oracle XE 11g, visual studio 2010 and vb.net. But Why I am getting error:

enter image description here

related to listener always when I turn off or hibernate my machine Services are also running.

This is listner code:

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
      (PROGRAM = extproc)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = DESKTOP-4R5A2SG)(PORT = 1521))
    )
  )

DEFAULT_SERVICE_LISTENER = (SUIDO)

And This is tnsname.ora code:

SUIDO =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = DESKTOP-4R5A2SG)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = SUIDO)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

ORACLR_CONNECTION_DATA = 
  (DESCRIPTION = 
    (ADDRESS_LIST = 
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) 
    ) 
    (CONNECT_DATA = 
      (SID = CLRExtProc) 
      (PRESENTATION = RO) 
    ) 
  ) 

Can anybody help me what can i do to fix this problem as soon as possible.

2

There are 2 best solutions below

0
On

First you report ora-12154 - tns could no resolve service connect identifier. This error means that whatever you specified as the target of your connect was not found in your tnsnames.ora. Say you specified 'sqlplus scott/tiger@fubar'. Then the reference to 'fubar' was not found in your tnsnames. End of story. And that means the request never left the client process and never got anywhere near the listener, so nothing about the listener matters. I have a more detailed explanation and demonstrations at https://edstevensdba.wordpress.com/2018/09/19/troubleshooting-ora-12154/

0
On

Second, you report " SQLPLUS IBR/IBR@SUIDO" returns "ORA-12514: TNS:listener does not currently know of service requested in connect"." This is a distinctly different problem with a distinctly different answer. I see from your tnsnames file the 'suido' resolves to a service_name of 'SUIDO' running on server 'DESKTOP-4R5A2SG', where it expected that there is a listener using port 1521, and that said listner knows about service 'SUIDO'. The error 'ORA-12514' definitively means that the listener does not know of such a service. You can prove this out by executing 'lsnrctl status' and observing the services that the listener knows about. I'd say it's near 100 percent certain that the listener does not know of the service because the database is not started. If the database were started, it should have registered itself with the listener.

There is a more detailed discussion of this error, here.