0

Oracle サーバーをインストールしましたが、正常に動作しています。ただし、別のマシンにインストールされているクライアントは動作していません。エラー TNS-12541: TNS: リスナーがありませんが表示されます。

私の TNSNames.ora:

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

サーバー マシンでは、databaseIO に接続できます。

他に行う構成はありますか?

4

1 に答える 1

2

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.

于 2013-07-09T19:06:27.330 に答える