码迷,mamicode.com
首页 > 数据库 > 详细

Oracel数据库 listener.ora和tnsnames.ora配置

时间:2017-05-27 13:33:48      阅读:314      评论:0      收藏:0      [点我收藏+]

标签:alt   cat   mini   server   ext   idt   port   prot   oca   

oracel服务经常会出现各种监听问题,很多情况是 listener.ora和tnsnames.ora 的配置有问题  D:\app\Administrator\product\11.2.0\dbhome_1 oracel安装路径径参考自己的

listener.ora配置   


# listener.ora Network Configuration File: D:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = D:\app\Administrator\product\11.2.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:D:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
  )

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

ADR_BASE_LISTENER = D:\app\Administrator

tnsnames.ora配置

# tnsnames.ora Network Configuration File: D:\app\Administrator\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

LISTENER_ORCL =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))


ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )

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

重启listener和orcl服务 

技术分享

 

进入 cmd 命令行, 输入 sqlplus回车,输入数据库用户名回车,输入密码回车,登录成功。

技术分享

 

Oracel数据库 listener.ora和tnsnames.ora配置

标签:alt   cat   mini   server   ext   idt   port   prot   oca   

原文地址:http://www.cnblogs.com/lovedaodao/p/6912297.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!