0
votes

I have windows server on virtual machine which I build 2 years ago. I Installed Oracle database and Sql Server on it. It worked fine. but last two days I try to use oracle database and I got an error:

ORA-12514 TNS:listener does not currently know of service requested in connect descriptor

I checked listener.ora and tnsnames.ora and couldn't found error.

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 = THIS_IS_MY_HOST_NAME_OR_IP)(PORT = 1521))
    )
  )

DEFAULT_SERVICE_LISTENER = (XE)

and tnsnames.ora

MAIN_DATABASE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = THIS_IS_MY_HOST_NAME_OR_IP)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )

Ok. After that I build another virtual machine and installed Oracle database(XE) again but still have same error. OracleXe and TNSlistener services are started. any ideas?

Please help.

1
What is the connect string you are using?Brian DeMilia
do you have multiple ORACLE_HOME ? if so, then add your tns entry in all the tnsnames.ora fileanudeepks
I am trying to connect using pl/sql developer. I filled forms correctly and usual. this is not nothing new for megogagubi
No I have only one ORACLE_HOME. I just installed it on new Virtual machine.gogagubi

1 Answers

0
votes

Well. I found this solution but it is not best solution I guess. OracleXe was installed already. When I changed name of my Virtual OS(ex. Computer name was User-xxx and i changed it User-zzz) I got this error:

ORA-12514 TNS:listener does not currently...

I saw listener.ora and tnsnames.ora and host was: HOST=User-xxx

I thought if I'll change User-xxx to User-zzz and it should work. Also tried to restart system but anyway it didn't work.

Solution was very simple. uninstall OracleXe and install again under new name. If someone know better solution please write.