oracle 监听与连接配置

前端之家收集整理的这篇文章主要介绍了oracle 监听与连接配置前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

服务器监听配置文件路径:

/data/oracle/product/11.2.0/network/admin/listener.ora

内容

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = /data/oracle

HOST = localhost.localdomain 不能简单写成loaclhost
需用查询语句查询得出:

select HOST_NAME from v$instance;

查询sid:

select instance_name from v$instance;

客户端连接配置(F:\app\client\ly\product\12.1.0\client_1\Network\Admin\tnsnames.ora):

ORCL11G = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.198)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SID = orcl) ) ) 

ORCL11G 前不能有空格. (SID = orcl) 这个orcl就是查询出的instance_name

原文链接:https://www.f2er.com/oracle/208512.html

猜你在找的Oracle相关文章