熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Oracle >> 正文

OracleRac監聽之困惑

2013-11-13 22:20:01  來源: Oracle 

  今天在客戶碰到一問題在這裡記錄一下

  /etc/hosts文件配置為

  引用

         localhost       loopback        # loopback (lo) name/address

  #public network

      hisdb

      hisdb

  #virtual ip address

     hisdb_vip

     hisdb_vip

  #private network used for rac

          hisdb_priv

          hisdb_priv

  listenerora文件配置為

  引用

  LISTENER_HISDB =

  (DESCRIPTION_LIST =

  (DESCRIPTION =

  (ADDRESS = (PROTOCOL = TCP)(HOST = hisdb_vip)(PORT = )(IP = FIRST))

  (ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = )(IP = FIRST))

  )

  )

  SID_LIST_LISTENER_HISDB =

  (SID_LIST =

  (SID_DESC =

  (SID_NAME = PLSExtProc)

  (ORACLE_HOME = /oracle/products/rdbms)

  (PROGRAM = extproc)

  )

  )

  SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER_HISDB=OFF

  INBOUND_CONNECT_TIMEOUT_ =

  PREFER_LEAST_LOADED_NODE_LISTENER_LISTENER_HISDB=OFF

  主機上監聽狀態顯示

  引用

  oracleorcl@hisdb:/home/oracle$lsnrctl status listener

  LSNRCTL for IBM/AIX RISC System/: Version Production on FEB

   ::

  Copyright (c) Oracle  All rights reserved

  Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=))

  STATUS of the LISTENER

  

  Alias                     LISTENER

  Version                   TNSLSNR for IBM/AIX RISC System/: Version

   Production

  Start Date                FEB ::

  Uptime                    days hr min sec

  Trace Level               off

  Security                  ON: Local OS Authentication

  SNMP                      ON

  Listener Parameter File   /oracle/products/rdbms/network/admin/listenerora

  Listener Log File         /oracle/products/rdbms/network/log/listenerlog

  Listening Endpoints Summary

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hisdb)(PORT=)))

  Services Summary

  Service +ASM has instance(s)

  Instance +ASM status BLOCKED has handler(s) for this service

  Service +ASM_XPT has instance(s)

  Instance +ASM status BLOCKED has handler(s) for this service

  Service orcl has instance(s)

  Instance orcl status READY has handler(s) for this service

  Instance orcl status READY has handler(s) for this service

  Service orclXDB has instance(s)

  Instance orcl status READY has handler(s) for this service

  Instance orcl status READY has handler(s) for this service

  Service orcl_XPT has instance(s)

  Instance orcl status READY has handler(s) for this service

  Instance orcl status READY has handler(s) for this service

  Service standby has instance(s)

  Instance standby status READY has handler(s) for this service

  Instance standby status READY has handler(s) for this service

  Service standby_XPT has instance(s)

  Instance standby status READY has handler(s) for this service

  Instance standby status READY has handler(s) for this service

  The command completed successfully

  引用

  oracleorcl@hisdb:/oracle/products/rdbms/network/admin$lsnrctl service

  LSNRCTL for IBM/AIX RISC System/: Version Production on FEB

   ::

  Copyright (c) Oracle  All rights reserved

  Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=))

  Services Summary

  Service +ASM has instance(s)

  Instance +ASM status BLOCKED has handler(s) for this service

  Handler(s):

  DEDICATED established: refused: state:ready

  LOCAL SERVER

  Service +ASM_XPT has instance(s)

  Instance +ASM status BLOCKED has handler(s) for this service

  Handler(s):

  DEDICATED established: refused: state:ready

  LOCAL SERVER

  Service orcl has instance(s)

  Instance orcl status READY has handler(s) for this service

  Handler(s):

  DEDICATED established: refused: state:ready

  REMOTE SERVER

  (ADDRESS=(PROTOCOL=TCP)(HOST=hisdb)(PORT=))

  Instance orcl status READY has handler(s) for this service

  Handler(s):

  DEDICATED established: refused: state:ready

  LOCAL SERVER

  DEDICATED established: refused: state:ready

  REMOTE SERVER

  (ADDRESS=(PROTOCOL=TCP)(HOST=hisdb)(PORT=))

  Service orclXDB has instance(s)

  Instance orcl status READY has handler(s) for this service

  Handler(s):

  D established: refused: current: max: state:ready

  DISPATCHER <machine: hisdb pid: >

  (ADDRESS=(PROTOCOL=tcp)(HOST=hisdb)(PORT=))

  Instance orcl status READY has handler(s) for this service

  Handler(s):

  D established: refused: current: max: state:ready

  DISPATCHER <machine: hisdb pid: >

  (ADDRESS=(PROTOCOL=tcp)(HOST=hisdb)(PORT=))

  Service orcl_XPT has instance(s)

  Instance orcl status READY has handler(s) for this service

  Handler(s):

  DEDICATED established: refused: state:ready

  REMOTE SERVER

  (ADDRESS=(PROTOCOL=TCP)(HOST=hisdb)(PORT=))

  Instance orcl status READY has handler(s) for this service

  Handler(s):

  DEDICATED established: refused: state:ready

  LOCAL SERVER

  DEDICATED established: refused: state:ready

  REMOTE SERVER

  (ADDRESS=(PROTOCOL=TCP)(HOST=hisdb)(PORT=))

  Service standby has instance(s)

  Instance standby status READY has handler(s) for this service

  Handler(s):

  DEDICATED established: refused: state:ready

  REMOTE SERVER

  (ADDRESS=(PROTOCOL=TCP)(HOST=hisdb)(PORT=))

  Instance standby status READY has handler(s) for this service

  Handler(s):

  DEDICATED established: refused: state:ready

  LOCAL SERVER

  DEDICATED established: refused: state:ready

  REMOTE SERVER

  (ADDRESS=(PROTOCOL=TCP)(HOST=hisdb)(PORT=))

  Service standby_XPT has instance(s)

  Instance standby status READY has handler(s) for this service

  Handler(s):

  DEDICATED established: refused: state:ready

  REMOTE SERVER

  (ADDRESS=(PROTOCOL=TCP)(HOST=hisdb)(PORT=))

  Instance standby status READY has handler(s) for this service

  Handler(s):

  DEDICATED established: refused: state:ready

  LOCAL SERVER

  DEDICATED established: refused: state:ready

  REMOTE SERVER

  (ADDRESS=(PROTOCOL=TCP)(HOST=hisdb)(PORT=))

  The command completed successfully

  監聽進程顯示為

  引用

  oracleorcl@hisdb:/home/oracle$ps ef|grep tns

  oracle              Feb         : /oracle/products/rdbms/bin/tnslsnr LISTENER inherit

  oracle    ::  pts/  : grep tns

  rac狀態顯示為

  引用

  oracleorcl@hisdb:/home/oracle$crs_stat t

  Name           Type           Target    State     Host

  

  oraSMasm application    ONLINE    ONLINE    hisdb

  oralsnr application    ONLINE    ONLINE    hisdb

  orabgsd application    ONLINE    ONLINE    hisdb

  orabons application    ONLINE    ONLINE    hisdb

  orabvip application    ONLINE    ONLINE    hisdb

  oraSMasm application    ONLINE    ONLINE    hisdb

  oralsnr application    ONLINE    ONLINE    hisdb

  orabgsd application    ONLINE    ONLINE    hisdb

  orabons application    ONLINE    ONLINE    hisdb

  orabvip application    ONLINE    ONLINE    hisdb

  oraorcldb    application    ONLINE    ONLINE    hisdb

  oraorclcs application    ONLINE    ONLINE    hisdb

  oraclsrv application    ONLINE    ONLINE    hisdb

  oraclsrv application    ONLINE    ONLINE    hisdb

  oralinst application    ONLINE    ONLINE    hisdb

  oralinst application    ONLINE    ONLINE    hisdb

  本地客戶端tnsnamesora配置為

  引用

  RAC =

  (DESCRIPTION =

  (ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = ))

  (CONNECT_DATA =

  (SERVER = DEDICATED)

  (SERVICE_NAME = orcl)

  (INSTANCE_NAME = orcl)

  )

  )

  奇怪的事情發生了tnsping居然能通為什麼呢?

  引用

  C:\Documents and Settings\Administrator>tnsping rac

  TNS Ping Utility for bit Windows: Version Production on

   ::

  Copyright (c) Oracle  All rights reserved

  已使用的參數文件:

  D:\oracle\product\\client_\network\admin\sqlnetora

  已使用 TNSNAMES 適配器來解析別名

  Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =

  )(PORT = )) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)

  (INSTANCE_NAME = orcl)))

  OK ( 毫秒)


From:http://tw.wingwit.com/Article/program/Oracle/201311/18794.html
    推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.