Abhishek Roy
Abhishek Roy

Reputation: 73

Listener refused the connection with the following error : ORA-12514, TNS:listener does not know of service requested in connect descriptor

Unable to connect to Local Oracle DB using SQLDeveloper.

enter image description here

I am able to connect through SQLPlus but get the above error in SQLDeveloper.

enter image description here enter image description here

My connection details for SQLDeveloper : enter image description here

Here are my tnsnames.ora and listener.ora files

tnsnames.ora

XE =
  (DESCRIPTION =
    (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = ######.com)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )

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) 
    ) 
  ) 

listener.ora

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 = ######.com)(PORT = 1521))
    )
  )

DEFAULT_SERVICE_LISTENER = (XE)

######.com is the host-name of my PC.

I get the following message if I try to start the listener:

enter image description here

Any help would be appreciated.

Edit :

Listener status (the part marked in yellow is my computer's name/host name) enter image description here

Upvotes: 0

Views: 20528

Answers (1)

Mohcen
Mohcen

Reputation: 1

try to set proper global name, find the current using:

select * from global_name;

and

alter database rename global_name to xe;

check further info using:

$>lsnrctl status

$>tnsping xe

Upvotes: 0

Related Questions