oracle 客戶端如何連線到oracle 11gR2資料庫(DNS SCAN IP)

paulyibinyi發表於2010-07-20

    oracle 客戶端如何連線到ORACLE 11GR2  帶有DNS SCAN IP 的資料庫伺服器

[grid@rac2 ~]$ srvctl config scan
SCAN name: racnode-cluster-scan.racnode.com, Network: 1/192.168.3.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /racnode-cluster-scan.racnode.com/192.168.3.231
SCAN VIP name: scan2, IP: /racnode-cluster-scan.racnode.com/192.168.3.233
SCAN VIP name: scan3, IP: /racnode-cluster-scan.racnode.com/192.168.3.232

 

客戶端TNSNAMES.ORA配置

RACDB =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = racnode-cluster-scan.racnode.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = racdb)
    )
  )

TNSPING 測試

客戶端網路配置指向DNS伺服器地址 192.168.3.32

C:\Documents and Settings\Administrator>tnsping racdb

TNS Ping Utility for 32-bit Windows: Version 11.1.0.7.0 - Production on 20-7月 -
2010 18:53:50

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

已使用的引數檔案:
D:\app\Administrator\product\11.1.0\db_1\network\admin\sqlnet.ora


已使用 TNSNAMES 介面卡來解析別名
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = racnode-
cluster-scan.racnode.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SE
RVICE_NAME = racdb)))
OK (80 毫秒)

客戶端連線

C:\Documents and Settings\Administrator>sqlplus

SQL*Plus: Release 11.1.0.7.0 - Production on 星期二 7月 20 18:46:15 2010

Copyright (c) 1982, 2008, Oracle.  All rights reserved.


連線到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management,
OLAP,
Data Mining and Real Application Testing options

SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
racdb2

SQL> exit

 

 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-668533/,如需轉載,請註明出處,否則將追究法律責任。

相關文章