PL/SQL远程连接oracle

PL/SQL远程连接oracle服务器出现ora-12541 TNS:无监听

出现12541错误(无监听程序)时可修改ORAHOME\product\10.2.0\db_1\NETWORK\ADMIN\listener.ora文件

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
  )

将localhost改为IP地址或者主机名

同时更改客户端ORAHOME\product\10.2.0\db_1\NETWORK\ADMIN\tnsnames.ora文件中的如下内容一致:

ORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

将localhost改为IP地址或者主机名

如果非固定IP,建议写成主机名。

ORAHOME是你的oracle的安装目录。

一般情况下这样配置就可以连接了。


本机安装了oracl服务器

你可能感兴趣的:(oracle)