ORACLE监听器 The listener supports no services 问题解决方法

安装环境:
操作系统版本:RHCLE5
ORACLE版本:11gR2
开启监听器,远程连接报错:
ORA-12514: TNS:linstener does not currently know of service requested in connect descriptor
解决问题思路:
查看监听器状态,关闭后重新启动监听器
[oracle@rhel5 admin]$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 14-AUG-2012 19:20:55

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

Starting /u01/app/oracle/product/11.2/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/11.2/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/rhel5/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.11.210)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.11.210)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                14-AUG-2012 19:20:55
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/rhel5/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.11.210)(PORT=1521)))
The listener supports no services
The command completed successfully

结果发现错误信息:The listener supports no services

查看数据库service_name
sys@ORCL> show parameter service

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
service_names                        string      orcl

手工注册有时能够解决问题:
sys@ORCL> alter system register;
System altered.

查看监听器状态:
[oracle@rhel5 admin]$ lsnrctl start

注册成功:
[oracle@rhel5 admin]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 14-AUG-2012 20:23:26

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rhel5.oraclelinux.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                14-AUG-2012 20:22:49
Uptime                    0 days 0 hr. 0 min. 36 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/rhel5/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rhel5.oraclelinux.com)(PORT=1521)))
Services Summary...
Service "orcl" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully

注册依然失败:
[oracle@rhel5 admin]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 14-AUG-2012 20:18:02

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rhel5.oraclelinux.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                14-AUG-2012 20:17:45
Uptime                    0 days 0 hr. 0 min. 17 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/rhel5/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rhel5.oraclelinux.com)(PORT=1521)))
The listener supports no services
The command completed successfully

依然有错误信息:The listener supports no services

重建监听器:
问题依旧

查看LISTENER内容:
[oracle@rhel5 admin]$ cat listener.ora 
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = rhel5.oraclelinux.com)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = /u01/app/oracle

在LISTENER里添加内容:
SID_LIST_LISTENER=
  (SID_LIST=
      (SID_DESC=
                      #BEQUEATH CONFIG
         (GLOBAL_DBNAME=orcl)
         (SID_NAME=orcl)
         (ORACLE_HOME=/u01/app/oracle/product/11.2)
                      #PRESPAWN CONFIG
        (PRESPAWN_MAX=20)
        (PRESPAWN_LIST=
          (PRESPAWN_DESC=(PROTOCOL=tcp)(POOL_SIZE=2)(TIMEOUT=1))
        )
       )
      )

重启监听器,问题解决。


你可能感兴趣的:(oracle,listener,Services,Copyright,requested,currently)