TNS-01101: Could not find service name LISTENER_SCAN1

一:版本信息

操作系统版本:AIX 61009

数据库版本:11.2.0.3.11(RAC)


二:错误描述

  想查看一下LISTENER_SCAN1的状态,执行了如下命令:lsnrctl status LISTENER_SCAN1,发现命令报如下错误

lsnrctl status LISTENER_SCAN1

LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production on 29-DEC-2014 09:09:56

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

TNS-01101: Could not find service name LISTENER_SCAN1


"srvctl status scan" 和"ps -ef | grep tns" 显示SCAN1 listeners 是正常运行的

srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node hostdb1
SCAN VIP scan2 is enabled
SCAN VIP scan2 is running on node hostdb2
SCAN VIP scan3 is enabled
SCAN VIP scan3 is running on node hostdb2

grid@hostdb1:/home/grid$ ps -ef|grep tns
    grid 53936300        1   0   Dec 25      -  0:03 /apps/oracle/11.2.0.3/grid/bin/tnslsnr LISTENER -inherit
    grid 56885382        1   0   Dec 19      -  0:11 /apps/oracle/11.2.0.3/grid/bin/tnslsnr LISTENER_SCAN1 -inherit
    grid 12190074 10879414   0 09:57:24  pts/1  0:00 grep tns


三:错误原因及解决方法

   错误原因是因为TNS_ADMIN环境变量没有设置,设置环境变量export TNS_ADMIN=$GRID_HOME/network/admin后,再次执行lsnrctl status LISTENER_SCAN1

lsnrctl status LISTENER_SCAN1

LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production on 29-DEC-2014 09:15:52

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_SCAN1
Version                   TNSLSNR for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production
Start Date                19-DEC-2014 10:29:07
Uptime                    9 days 22 hr. 46 min. 45 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      ON
Listener Parameter File   /apps/oracle/11.2.0.3/grid/network/admin/listener.ora
Listener Log File         /apps/oracle/11.2.0.3/grid/log/diag/tnslsnr/hostdb1/listener_scan1/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.48.224)(PORT=1521)))
Services Summary...
Service "egapdb" has 2 instance(s).
  Instance "egapdb1", status READY, has 1 handler(s) for this service...
  Instance "egapdb2", status READY, has 1 handler(s) for this service...
Service "egapdr" has 2 instance(s).
  Instance "egapdb1", status READY, has 1 handler(s) for this service...
  Instance "egapdb2", status READY, has 1 handler(s) for this service...
The command completed successfully


##详情请参见 TNS-01101: Could not find service name for LISTENER_SCANx (Doc ID 1064628.1)

你可能感兴趣的:(listener_scan1,TNS_ADMIN,TNS-01101)