The listener supports no services 问题解决

问题:启动目标库监听时,出现 The listener supports no services 报错

$ lsnrctl status

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 22-MAR-2021 01:40:20

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

......   //此处省略若干行

The listener supports no services
The command completed successfully

解决方法:

1)配置静态监听

修改 listener.ora 文件

$ vi $ORACLE_HOME/network/admin/listener.ora

添加如下几行:

SID_LIST_LISTENER =
(SID_LIST =
  (SID_DESC =
  (GLOBAL_DBNAME = orcl)     //假设实例名为 orcl
  (SID_NAME = orcl)         //假设实例名为 orcl
  )
)

2)重新加载一次监听

$ lsnrctl reload

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 20-NOV-2020 16:21:33

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=X.X.X.X)(PORT=1521)))
The command completed successfully

3)查看监听器状态

$ lsnrctl status
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 20-NOV-2020 16:21:47

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=X.X.X.X)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date                20-NOV-2020 16:17:06
Uptime                    0 days 0 hr. 4 min. 40 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /oradata/oracle/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
Listener Log File         /oradata/oracle/app/diag/tnslsnr/Test/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=X.X.X.X)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "orcl" has 1 instance(s).
  Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

问题解决!

你可能感兴趣的:(Oracle,数据库,数据库,oracle)