Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
326 views
in Technique[技术] by (71.8m points)

oracle - SQL developer : Listener refused the connection

Dear stackoverflow community, I know this question was already asked, but I tried to find a solution and unfortunately I'm blocked since 3 days now. I installed Oracle 12c in Linux centos 7 server. When I try to access to the Oracle DB with SQL developer I have the following error:

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

What I do not understand is that if I restart the database I can connect. But Once I disconnect a try a reconnect I got the same error. Here is my listener.ora file

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = ns3008269.ip-151-80-45.eu)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

And my tnsnames.ora is :

 rspdata =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ns3008269.ip-151-80-45.eu)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = rspdata)
    )
  )

oraclepdb =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ns3008269.ip-151-80-45.eu)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = oraclepdb)
    )
  )

And finally you can fin in attachment a screenshot of my Installation configuration.

I tried lot of and lot of thing... but still blocked.

question from:https://stackoverflow.com/questions/65902497/sql-developer-listener-refused-the-connection

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Hello Stackoverflow community,

I was able to solve this issue. I re-installed Oracle 12c in Linux server and I used the tools netmgr and catmgr in order to configure the listener for the global DBname and also configure the services for PDB. This will automatically will modified the listener.ora and tnsnames.ora. So my conclusion is that when installing Oracle12c do not modify by hand the listener.ora and tnsnames.ora. Thank you all for your help and for the tips.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...