监听问题 The listener supports no services
问题描述
由于重启数据库服务器,导致之前配置的动态监听失效,找了很多资料发现,只需要重新配置就好了。网上大部分的都是检查修改listener.ora和tnsnames.ora文件。当然不是不推荐,至少这样要对文件的属性非常了解,改起来容易错。
我遇到的问题如下
解决
可以提前了解一些常用的指令https://blog.****.net/weixin_40343164/article/details/104949472
试过强制注册监听
sqlplus / as sysdba
SQL> alter system register;
System altered.
SQL> !
[[email protected] ~]$ lsnrctl status
依然没用
The listener supports no services
换个思路解决
突然想起,我不会改我可以重新配呀,下面就用netmgr oracle的图形化网络管理页面
$ lsnrctl stop #停掉监听管理
$ netmgr
保存
再点你绿色+新增一个
配置数据库服务
最后再保存一遍
[[email protected]~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-MAR-2020 17:12:40
Copyright © 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 18-MAR-2020 14:39:18
Uptime 0 days 2 hr. 33 min. 22 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /opt/oracle/app/oracle/diag/tnslsnr/db1/listener/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
Services Summary…
Service “db” has 1 instance(s).
Instance “db”, status UNKNOWN, has 1 handler(s) for this service…
The command completed successfully
配置成功!