Oracle Connection String for RAC Environment?(RAC 环境的 Oracle 连接字符串?)
问题描述
我有一个 ORACLE RAC 环境访问权限.详细信息是
I have got an ORACLE RAC Environment access .The details are
数据库名称:orcl服务名称:orclIP 地址: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 .
我没有与此相关的任何其他信息.我是否正确连接或我需要主机名或 IP 地址作为 orcl 服务名称.
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_BALANCE 或 FAILOVER 参数;请参阅文档.
You may also need the LOAD_BALANCE or FAILOVER parameters; see the docs.
这篇关于RAC 环境的 Oracle 连接字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:RAC 环境的 Oracle 连接字符串?
基础教程推荐
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
- 带更新的 sqlite CTE 2022-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
- 带有WHERE子句的LAG()函数 2022-01-01
- 从字符串 TSQL 中获取数字 2021-01-01
