RAC 环境的 Oracle 连接字符串?

Oracle Connection String for RAC Environment?(RAC 环境的 Oracle 连接字符串?)
本文介绍了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_BALANCEFAILOVER 参数;请参阅文档.

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

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

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

SQL to Generate Periodic Snapshots from Transactions Table(用于从事务表生成定期快照的SQL)
MyBatis support for multiple databases(MyBatis支持多个数据库)
Oracle 12c SQL: Missing column Headers in result(Oracle 12c SQL:结果中缺少列标题)
SQL query to find the number of customers who shopped for 3 consecutive days in month of January 2020(查询2020年1月连续购物3天的客户数量)
How to get top 10 data weekly (This week, Previous week, Last month, 2 months ago, 3 month ago)(如何每周获取前十大数据(本周、前一周、上个月、2个月前、3个月前))
Select the latest record for an Id per day - Oracle pl sql(选择每天ID的最新记录-Oracle pl SQL)