适用于RAC环境的Oracle连接字符串吗? [英] Oracle Connection String for RAC Environment?

查看:114
本文介绍了适用于RAC环境的Oracle连接字符串吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我具有ORACLE RAC环境访问权限.详细信息是

I have got an ORACLE RAC Environment access .The details are

数据库名称:orcl 服务名称:orcl IP地址:192.168.1.1和192.168.1.2

Database Name: orcl Service Name: orcl IP Address: 192.168.1.1 and 192.168.1.2

SQL> host srvctl status database -d orcl

Instance orcl1 is running on node orclnode1

Instance orcl2 is running on node orclnode2

我担心的是我的联系,这是使用

My concern is my connection, which is being established using

(DESCRIPTION=(ADDRESS=
    (PROTOCOL=TCP)(HOST=192.168.1.1) (PORT=1521)
)(CONNECT_DATA=(SID=orcl1)))

但是提供程序希望它通过orcl服务名称进行连接.

But the provider wants it to be connected via the orcl service name .

我没有与此相关的任何其他信息.我连接正确还是orcl服务名称需要主机名或IP地址.

I don`t have any other info related to this. Am I connecting correctly or I need hostname or IP address for orcl service name.

推荐答案

您的连接字符串引用一个服务器/节点上的一个实例.您应该改用通用服务名,并标识所有可用的服务器.

Your connection string is referencing one instance on one server/node. You should be using the common service name instead, and identifying all the servers it is available on.

与您相对应的是这样的(换行符只是为了清楚起见):

The equivalent for you would be something like this (line breaks just for clarity here):

(DESCRIPTION=(ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.1)(PORT=1521))
    (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.2)(PORT=1521))
)(CONNECT_DATA=(SERVICE_NAME=orcl)))

只要是可解析的,HOST参数使用DNS名称还是IP地址都没关系.

As long as it is resolvable, it shouldn't matter whether you use the DNS names or the IP addresses for the HOST parameters.

您可能还需要LOAD_BALANCEFAILOVER参数;参见文档.

You may also need the LOAD_BALANCE or FAILOVER parameters; see the docs.

这篇关于适用于RAC环境的Oracle连接字符串吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆