oracle 客户端如何连接到oracle 11gR2数据库(DNS SCAN IP)

    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 system/abcdefg@racdb

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/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/7199859/viewspace-668533/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值