ArcGIS地理数据库是否支持Oracle的RAC和TAF

106 篇文章 0 订阅
54 篇文章 2 订阅

看到Esri的技术文章有一篇专门说明ArcGIS是否支持Oracle的RAC和TAF,特此翻译一下,翻译内容为大概意思。



Oracle RAC 同时具备HA(High Availiablity) 和LB(LoadBalance). 而其高可用性的基础就是Failover(故障转移). 它指集群中任何一个节点的故障都不会影响用户的使用,连接到故障节点的用户会被自动转移到健康节点,从用户感受而言, 是感觉不到这种切换。

Oracle 10g RAC 的Failover 可以分为3种:
1. Client-Side Connect time Failover
2. Client-Side TAF
3. Service-Side TAF

----------------------------------------------------------------------------------

版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!

Blog:               http://blog.csdn.net/linghe301

----------------------------------------------------------------------------------


Technical Article   FAQ:  Does ArcGIS support Oracle RAC and TAF for highly available geodatabases?

Article ID:42292
Software: ArcSDE 10.2 ArcGIS for Desktop Advanced 10.2, 10.2.1 ArcGIS for Desktop Standard 10.2, 10.2.1 ArcGIS for Server10.2.1, 10.2.2
Platforms:N/A
Question
Does ArcGIS support Oracle RAC and TAF for highly available geodatabases?

Answer
There are many options when configuring Oracle Real Application Clusters (RAC) and Transparent Application Failover (TAF), many variations in hardware infrastructures and networks that support these configurations, and wide variation in customer workflows. ArcGIS supports RAC. TAF configurations vary widely, however, so a blanket statement cannot be made that ArcGIS supports TAF in all possible implementations. 

在企业级数据库建设中,经常会使用Oracle的RAC和TAF机制,ArcGIS支持RAC,TAF的配置类型比较多,但是没有一个权威的声明宣布ArcGIS在任何情况下支持TAF(个人觉得就是TAF类型多,ArcGIS不完全支持)

An important consideration for TAF failover is that ArcGIS connections obtain an in-memory lock that is session specific and managed by Oracle. This lock is used to ensure any schema or state locks are valid. When a failover occurs, the connection made to the surviving node is a new session and therefore results in the loss of the original lock. This can cause unexpected behavior in some editing scenarios. Loss of the original lock also allows modifications to the schema in read-only operations, which can result in unexpected behavior if schema locking is disabled on ArcGIS Server services that reference the data. Therefore, it is very important that thorough testing be done before implementing Oracle TAF with ArcGIS. 

TAF 故障转移的重要考虑因素是 ArcGIS 连接获得由 Oracle 管理会话的内存锁。这种锁用于确保任何架构或状态的锁是有效。当故障转移发生时,系统会产生一个新的会话连接没有故障的节点,那么势必会将原始的锁信息丢失掉,在进行编辑操作时肯定是不希望发生这种现象的。损失的原始锁还允许对架构的修改在只读操作,如果架构锁定引用数据的 ArcGIS Server 服务被禁用,可能导致意外的行为。因此,ArcGIS在Oracle的TAF环境下进行测试显得非常重要。


Oracle RAC is in use at several Esri customer sites using geodatabases, and Esri has tested basic RAC and TAF functionality for failover behavior. The results of that testing are described in this article. 


 Regardless of the configuration used, Esri strongly recommends that each customer perform thorough testing to ensure that all workflows and applications work as expected during failover scenarios.

----------------------------------------------------------------------------------

版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!

Blog:               http://blog.csdn.net/linghe301

----------------------------------------------------------------------------------



Background  
Oracle RAC provides clustering and high-availability (HA) for Oracle databases, allowing Oracle relational database management system software on multiple server nodes to manage a single Oracle database, thereby providing a resilient architecture for the database services. This is typically combined with a resilient storage tier and Oracle client configuration to provide failover in the case of a server node failure. TAF is typically part of an Oracle RAC configuration, providing client-side functionality that allows clients to reconnect to surviving databases in the event of a failure of a database instance. 

测试环境使用TAF最典型和常用的类型client-side 

Client-Side TAF(Transparent Application Failover)
现在的大部分流行的应用系统(如:weblogic, Jboss),都是启动时就建立若干到数据库的长连接,在应用程序整个生命周期内重用这些
连接。 而Client-Side Connet Time Failover的工作方式使它对应用程序的可用性没有太大帮助。

所以从Oracle 8.1.5 版本只有引入了新的Failover 机制—TAF。 所谓TAF,就是连接建立以后,应用系统运行过程中,如果某个实例发
生故障,连接到这个实例上的用户会被自动迁移到其他的健康实例上。对于应用程序而言,这个迁移过程是透明的,不需要用户的介
入,当然,这种透明要是有引导的,因为用户的未提交事务会回滚。 相对与Client-Side Connect Time Failover的用户程序中断(抛出
连接错误,用户必须重启应用程序),TAF这种方式在提高HA上有了很大的进步。

TAF 的配置也很简单,只需要在客户端的tnsnames.ora中添加FAILOVER_MODE配置项。这个条目有4个子项目需要定义。

1. METHOD: 用户定义何时创建到其实例的连接,有BASIC 和 PRECONNECT 两种可选值。
BASIC: 是指在感知到节点故障时才创建到其他实例的连接。
PRECONNECT:是在最初建立连接时就同时建立到所有实例的连接,当发生故障时,立刻就可以切换到其他链路上。

注意:server-side TAF的failover方式无法设置为PRECONNECT,只能设置为BASIC,10g,11g都是如此。所以,如果failover方式要设定
为PRECONNECT,就只能使用client-side TAF。

两种方法比较: BASIC方式在Failover时会有时间延迟,PRECONNECT方式虽然没有时间延迟,但是建立多个冗余连接会消耗更多资源,
两者就是是用时间换资源和用资源换时间的区别。

2. TYPE: 用于定义发生故障时对完成的SQL 语句如何处理,其中有2种类型:session 和select.

这2种方式对于未提交的事务都会自动回滚,区别在于对select 语句的处理,对于select,用户正在执行的select语句会被转移到新的实例
上,在新的节点上继续返回后续结果集,而已经返回的记录集则抛弃。

假设用户正在节点1上执行查询,整个结果集共有10000条记录,现在已从节点1上返回9000条记录,这时节点1宕机,用户连接被转移到节
点2上,如果是session模式,则需要重新执行查询语句;如果是select方式,会从节点2上继续返回剩下的1000条记录,而已经从节点1返
回的9000条记录不会重复返回给用户,对于用户而言,感受不到这种切换。

显然为了实现select 方式,Oracle 必须为每个session保存更多的内容,包括游标,用户上下文等,需要更多的资源也是用资源换时间
的方案。

----------------------------------------------------------------------------------

版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!

Blog:               http://blog.csdn.net/linghe301

----------------------------------------------------------------------------------


Test results  
Esri has found that setting the TAF failover type to Select provides the most highly available behavior when used with ArcGIS. Select allows applications that began fetching rows from a cursor before failover to continue fetching rows after failover. Any active transactions are rolled back at the time of failure because TAF cannot preserve active transactions after failover. 

Esri使用TAF的select方式进行测试,如果在只读环境下进行故障切换,在获取row的过程中,游标在故障切换后会继续进行row的获取,也就是上面举的相关例子。但是如果是有写的操作,在故障转移过程中是会回滚事务的,TAF是不会保留当前执行的事务的。

When using Select failover, connections in ArcGIS for Desktop and ArcGIS Server switch to a surviving node for most simple operations such as zoom, pan, or refresh. There is a delay before the connection resumes, and that delay depends upon the infrastructure supporting the RAC as well as other configuration parameters. 

当使用select方式,ArcGIS for Desktop 和 ArcGIS Server 在进行如放大、浏览、刷新等操作时,连接会自动切换到没有问题的节点中。

Testing also found that when using Select failover, connections are switched to a surviving node during simpler non-versioned and versioned edit sessions. 

使用select方式,在进行监督的非版本和版本化编辑事务,连接也会自动进行切换。
这个之所以使用simpler就是说明简单事务可能执行的比较快,或者说不可能出现在事务执行过程中进行故障切换。

Larger bulk data loads fail, however, since active or in-progress transactions are automatically rolled back when using Select failover. 
与之相比较的是 使用select方式在执行大数据量的加载,就会出现问题,但是Oracle会进行事务回滚来保证数据的一致性

----------------------------------------------------------------------------------

版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!

Blog:               http://blog.csdn.net/linghe301

----------------------------------------------------------------------------------


Other failover types  
TAF offers two other failover types: None and Session. When using either of these failover types, ArcGIS for Desktop connections fail if a node fails, and an error message similar to the following is returned: 
TAF还支持None和事务两种类型,不管使用那个类型,ArcGIS for Desktop在进行连接某个节点出现故障时都会出现如下错误

One or more layers failed to draw:
<user>.<layer>: Failure to access the DBMS server [ORA-03114: not connected to ORACLE]

Manual reconnection to the surviving node from ArcGIS for Desktop is required. 
ArcGIS for Desktop需要手动重新启动连接到没有故障的节点中

If the primary node fails, ArcGIS for Server connects automatically to the surviving node when the next ArcGIS Server operation is performed, although there is a pause while the failover connection is made.
如果主节点出现问题,ArcGIS for Server在进行下一个操作过程中会自动连接到没有问题的节点中。

----------------------------------------------------------------------------------

版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!

Blog:               http://blog.csdn.net/linghe301

----------------------------------------------------------------------------------


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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值