oracle监听提示The listener supports no services

上回把公司的BI库从11.2.0.1升级到11.2.0.4,最后监听出现了问题,挂在了1522端口上。

这两天一顿操作,把监听又换回到1521上,但是监听却出了问题,连不上数据库。登上去看了一下,lsnrctl status提示The listener supports no services,也就是说监听没有识别库,先后采用了两种方法,如下:

一、

SQL> show parameter service_names –查看服务名称

NAME TYPE VALUE


service_names string orcl

SQL>alter system register

system altered

SQL>exit

强制注册一遍,然后重新启动监听,发现还是不行。

二、在listener.ora中添加如下代码:

SID_LIST_LISTENER =  
(SID_LIST =  
  (SID_DESC =  
  (GLOBAL_DBNAME = orcl)
  (SID_NAME = orcl)
  )
)

使之成为这样:

[oracle@oracle11g admin]$ cat listener.ora 
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = oracle11g)(PORT = 1521))
    )
  )
SID_LIST_LISTENER =  
(SID_LIST =  
  (SID_DESC =  
  (GLOBAL_DBNAME = orcl)
  (SID_NAME = orcl)
  )
)
ADR_BASE_LISTENER = /u01/app/oracle

再重新启动监听,

lsnrctl stop

lsnrctl start

这下监听就正常了,也可以连上了。