Oracle数据库监听文件配置

这篇博客展示了如何检查Oracle数据库的监听器状态。通过`ps`和`lsnrctl`命令,我们可以看到监听器正在运行,并且连接到了172.20.3.20的1521端口。监听器配置文件为`listener.ora`,其中定义了名为'cdb'的服务,但服务状态显示为UNKNOWN。这可能是数据库实例或连接问题。
摘要由CSDN通过智能技术生成

查看监听状态:

[oracle@ydhl ~]$ ps -ef | grep tns
root       336     2  0 11月24 ?      00:00:00 [netns]
oracle    4978  4540  0 14:17 pts/2    00:00:00 grep --color=auto tns
oracle   28540     1  0 12月04 ?      00:00:01 /u01/app/oracle/product/12.1.0/db_1/bin/tnslsnr LISTENER -inherit
[oracle@ydhl ~]$ lsnrctl status LISTENER

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 05-DEC-2021 14:17:35

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=172.20.3.20)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date                04-DEC-2021 14:30:43
Uptime                    0 days 23 hr. 46 min. 52 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/12.1.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/ydhl/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.20.3.20)(PORT=1521)))
Services Summary...
Service "RZCDB" has 1 instance(s).
  Instance "cdb", status READY, has 1 handler(s) for this service...
Service "cdb" has 1 instance(s).
  Instance "cdb", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

查看监听文件配置

[oracle@ydhl ~]$ cat /u01/app/oracle/product/12.1.0/db_1/network/admin/listener.ora
LISTENER =
  (ADDRESS_LIST=
        (ADDRESS=(PROTOCOL=tcp)(HOST=172.20.3.20)(PORT=1521))
  )
SID_LIST_LISTENER=
   (SID_LIST=
        (SID_DESC=
          (GLOBAL_DBNAME=cdb)
          (SID_NAME=cdb)
          (ORACLE_HOME=/u01/app/oracle/product/12.1.0/db_1)
        )
    )
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值