Configuring the connection between client and server Oracle 10g

橙三吉。 提交于 2020-01-10 06:05:12

问题


I've installed the oracle server and it's working properly. However, the client which is installed in another machine is not working. The error TNS-12541: TNS:there is no listener appears.

My TNSNames.ora:

SCP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.2.39)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = DatabaseIO)
)
)

In server machine I can connect to the databaseIO.

Are there other configurations to do?


回答1:


In a comment you have an extract from lsnrctl status:

Listening Endpoints summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Services summary...

Your listener is only listening on 127.0.0.1, so connections can only be made from the server. There is nothing listening on your external address 10.0.2.39, so connections to port 1521 on that address fail.

Your listener.ora presumably has something either a single ADDRESS, or no ADDRESS at all, which will default to localhost:1521. You need to modify it to something like:

LISTENER =
...
    (ADDRESS_LIST =
      ...
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.2.39)(PORT = 1521))
    )

or your machine's host name if that's resolvable to that address. Ideally this would be done through netca rather than by editing the file by hand.



来源:https://stackoverflow.com/questions/17555281/configuring-the-connection-between-client-and-server-oracle-10g

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!