oracle-11g-R2监听文件配置

客户端连接oracle数据库时出现如下错误:

Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor

首先看看Oracle服务是否开启:

然后找到listener.ora监听文件,具体位置:D:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora

即:$ORACLE_HOME/network/admin

原监听文件lisener.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 = WIN-VATV98IF527)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = D:\app\Administrator

修改为

红色部分为添加内容,蓝色可修改为服务器的IP地址

# 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")
    )

   (SID_DESC =
      (GLOBAL_DBNAME = ORCL)
      (ORACLE_HOME = D:\app\Administrator\product\11.2.0\dbhome_1)
      (SID_NAME = ORCL)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = WIN-VATV98IF527)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = D:\app\Administrator

停止监听服务:

C:\Users\Administrator>lsnrctl stop

C:\Users\Administrator>lsnrctl stop

LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 11-8月 -2019 16:0
5:36

Copyright (c) 1991, 2010, Oracle.  All rights reserved.

正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
命令执行成功

启动监听服务:

C:\Users\Administrator>lsnrctl start

C:\Users\Administrator>lsnrctl start

LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 11-8月 -2019 16:0
5:40

Copyright (c) 1991, 2010, Oracle.  All rights reserved.

启动tnslsnr: 请稍候...

TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
系统参数文件为D:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listene
r.ora
写入d:\app\administrator\diag\tnslsnr\WIN-VATV98IF527\listener\alert\log.xml的日
志信息
监听: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
监听: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=WIN-VATV98IF527)(PORT=1521)))

正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
LISTENER 的 STATUS
------------------------
别名                      LISTENER
版本                      TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Produ
ction
启动日期                  11-8月 -2019 16:05:43
正常运行时间              0 天 0 小时 0 分 3 秒
跟踪级别                  off
安全性                    ON: Local OS Authentication
SNMP                      OFF
监听程序参数文件          D:\app\Administrator\product\11.2.0\dbhome_1\network\a
dmin\listener.ora
监听程序日志文件          d:\app\administrator\diag\tnslsnr\WIN-VATV98IF527\list
ener\alert\log.xml
监听端点概要...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=WIN-VATV98IF527)(PORT=1521)))
服务摘要..
服务 "CLRExtProc" 包含 1 个实例。
  实例 "CLRExtProc", 状态 UNKNOWN, 包含此服务的 1 个处理程序...
服务 "ORCL" 包含 1 个实例。
  实例 "ORCL", 状态 UNKNOWN, 包含此服务的 1 个处理程序...
命令执行成功

参考博客:

Oracle 11g ORA-12514:TNS:监听程序当前无法识别连接描述符中请求的服务

https://blog.csdn.net/zl570932980/article/details/77864157

原文地址:https://www.cnblogs.com/djlsunshine/p/11335327.html

时间: 2024-10-07 23:23:29

oracle-11g-R2监听文件配置的相关文章

Windows平台下Oracle 11g R2监听文件日志过大,造成客户端无法连接的问题处理

近期部署在生产环境的应用突然无法访问,查看应用日志发现无法获取数据库连接. SystemErr R Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection SystemErr R at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:359) SystemErr R at oracle.net.resolve

oracle 11g rac 监听程序offline

oracle 11g rac 监听程序在调整过网络后出现监听进程offline,而且两台节点之间频繁切换,查看日志/var/log/message 发现有频繁的注册撤销动作. 监听日志 /u01/app/oracle/diag/tnslsnr/rac1/listener/trace/listener.log监听文件 /u01/app/11.2.0/grid/network/admin/listener.oraoracle错误日志 /u01/app/oracle/diag/rdbms/oaorcl

ORACLE 多实例监听的配置

多实例监听的配置 三种情况: 1.一个监听在一个IP一个端口上监听多个实例 2.一个监听在一个IP不同端口上监听多个实例 3.多个监听监听多个实例 情况1: listener.ora文件: # listener.ora Network Configuration File: E:\app\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora # Generated by Oracle configuration tools. SID_LIST_OR

Oracle 11g RAC 监听日常管理

需要必须掌握的命令,上周遇到了一个小问题,就是需要重启数据库监听,有的同学竟然使用oracle用户重启监听,原理就搞错了怎么行.以下操作都需要再grid用户下进行操作. 1.查看监听状态 <roidb2:+ASM2:/home/grid>$srvctl status listener Listener LISTENER is enabled Listener LISTENER is running on node(s): roidb1,roidb2 <roidb2:+ASM2:/home

有一台oracle 11g的监听莫名死掉,lsnrctl stop /status 一直处于等待,客户端plsql连不上

到oracle服务器上设置下面的 解决方案:在Oracle Net Server tracing/logging中出现这个错误,请在sqlnet.ora中设置DIAG_ADR_ENABLED =OFF在Listener component中出现这个错误,请在listener.ora中设置DIAG_ADR_ENABLED_ = OFF sqlnet.ora:SQLNET.INBOUND_CONNECT_TIMEOUT=180listener.ora:INBOUND_CONNECT_TIMEOUT_

配置oracle监听文件

配置oracle监听文件如果自己配置的监听文件总是出错,可以复制线面的信息进到自己配置文件中更改主机信息即可 [[email protected] admin]$ cat tnsnames.ora# tnsnames.ora Network Configuration File: /oracle/oracle/11g/network/admin/tnsnames.ora# Generated by Oracle configuration tools. ORCL =(DESCRIPTION =(

win7 安装oracle 10g 未生成监听文件 导致配置监听时无法保存

最近这两天一直在为安装 的oracle 配置监听无法保存 再找各种解决方案,最后自己居然自己配置出来了. 因为缺少监听文件,拷贝别人的放到自己的目录下C:\oracle\product\10.2.0\client_1\NETWORK\ADMIN   listener.ora.tnsnames.ora和 sqlnet.ora 1.修改 tnsnames.ora  中的 # tnsnames.ora Network Configuration File:  c:\oracle\product\10.

vCenter Server 5.5配置独立Oracle 11g R2数据库

1.  环境清单 服务器 操作系统 应用软件 vCenter  Server服务器 Windows  Server 2008R2-64bit vSphere  5.5 DB服务器 CentOS  7.1-64bit Oracle  11g r2 2.  安装Oracle 11g R2 在Centos7.1中安装Oracle 11g R2的过程不是本文档主讲内容,顾忽略. 3.  为vCenter Server创建数据库 登入DB服务器(确保centos 7已启用图形界面) 鼠标右键选择打开命令行

oracle 11g r2 rac ssh两节点互信对等配置Permission denied (publickey,gssapi-with-mic,password)

问题:安装oracle 11g r2 RAC grid 时,配置两节点ssh互信对等配置不成功,具体错误信息如下: ------------------------------------------------------------------------ Verifying SSH connectivity has been setup from rac1 to rac1 -----------------------------------------------------------