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

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:604

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

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】