ITPub博客

首页 > 数据库 > Oracle > oracle-rac-scan 测试

oracle-rac-scan 测试

原创 Oracle 作者:zuoqi_71 时间:2014-03-28 18:04:44 0 删除 编辑


刚装的rac 趁热乎赶快测试一下吧

C:\Users\Administrator>srvctl config scan
SCAN name: scan-cluster, Network: 1/10.120.240.0/255.255.240.0/pub
SCAN VIP name: scan1, IP: /scan-cluster/10.120.249.145

C:\Users\Administrator>lsnrctl status listener_scan1

LSNRCTL for 64-bit Windows: Version 11.2.0.4.0 - Production on 28-MAR-2014 17:45:57

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_SCAN1
Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.4.0 - Produ
ction
Start Date                28-MAR-2014 09:22:06
Uptime                    0 days 8 hr. 23 min. 52 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   C:\app\11.2.0.4\grid\network\admin\listener.ora
Listener Log File         C:\app\11.2.0.4\grid\log\diag\tnslsnr\oradb1\listener_scan1\alert\log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\LISTENER_SCAN1ipc)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.120.249.145)(PORT=1521)))
Services Summary...
Service "infra" has 2 instance(s).
  Instance "infra1", status READY, has 1 handler(s) for this service...
  Instance "infra2", status READY, has 1 handler(s) for this service...
Service "infraXDB" has 2 instance(s).
  Instance "infra1", status READY, has 1 handler(s) for this service...
  Instance "infra2", status READY, has 1 handler(s) for this service...
The command completed successfully


listener.ora

LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))  
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1))))  
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON  
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON  

-- client
tnsnames.ora

rac =  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.120.249.145)(PORT = 1521))
    (CONNECT_DATA =
      (SERVICE_NAME = infra)
    )
  )


C:\Users\Administrator>tnsping infra

TNS Ping Utility for 64-bit Windows: Version 11.2.0.4.0 - Production on 28-MAR-2014 17:53:58

Copyright (c) 1997, 2013, Oracle.  All rights reserved.

Used parameter files:
C:\app\11.2.0.4\grid\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = scan-cluster)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = infra))
)
OK (20 msec)

C:\Users\Administrator>sqlplus sys/XXX@rac as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on Fri Mar 28 17:22:50 2014

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 11g Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options


SQL> select instance_name from v$instance;

INSTANCE_NAME
------------------------------------------------
infra2


SQL> exit
Disconnected from Oracle Database 11g Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options


C:\Users\Administrator>sqlplus sys/XXX@rac as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on Fri Mar 28 17:22:56 2014

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 11g Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL> select instance_name from v$instance;

INSTANCE_NAME
------------------------------------------------
infra1


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22193071/viewspace-1131819/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-02-26

  • 博文量
    48
  • 访问量
    144463