Oracle RAC 是否允许节点之间完全透明的故障转移?
我有一个使用 Hibernate 在 Oracle 10g 上运行的应用程序。我想知道是否可以使用 Oracle RAC 使应用程序在数据库故障方面具有高可用性,而无需在应用程序端更改任何代码。
我有两个用于该应用程序的 Oracle RAC 节点,理想情况下希望能够拔掉其中一个节点的插头并使应用程序继续运行,而不会出现任何异常到达应用程序代码。
我的应用程序向数据库发送选择、插入、更新和删除查询。
我一直在阅读有关透明应用程序故障转移的内容,但我发现的网站暗示只有选择查询才能透明地进行故障转移,所有其他类型的查询将导致抛出异常并且必须重新执行查询。我宁愿避免这种情况,因为我不想为进行数据库查询的代码库的每个部分添加额外的异常处理。
I have an application running on Oracle 10g using Hibernate. I am wondering if it is possible to make the application highly available with respect to database failures without any code changes on the application side, using Oracle RAC.
I have two Oracle RAC nodes for the application, and ideally would like to be able to pull the plug on one of the nodes and have the application continue to run, without any exceptions reaching the application code.
My application sends select, insert, update and delete queries to the database.
I have been reading about Transparent Application Failover, but the sites I have found imply that only select queries can be failed over transparently, and that all other types of queries will result in exceptions being thrown and the query having to be re-executed. I would rather avoid this as I do not want to add extra exception handling to every part of my code base which makes database queries.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
抱歉,但不是真的。您正在查看透明应用程序故障转移 (TAF),而 Oracle 目前除 SELECT 语句外不支持 TAF。 DML 需要重新启动。请查看这篇文章,了解 RAC(和 TAF)的功能为你做。
无论如何,您都需要能够处理事务失败。这是我们进行交易的一个重要原因……这样我们就可以优雅地处理失败的事情。还要认识到,硬件故障(RAC 所保护的)只是事务可能失败的众多原因之一。
祝你好运,编码愉快!
Sorry, but not really. You're looking at Transparent Application Failover (TAF) and Oracle doesn't currently support TAF for anything but SELECT statements. DML will need to be restarted. Take a look at this article for a good explanation of what RAC (and TAF) can do for you.
No matter what, you're going to need to be able to handle transaction failures. That's a big reason why we have transactions... so we can handle things failing gracefully. Realize, as well, that hardware failure (what RAC protects you against) is only one of a myriad of reasons a transaction may fail.
Good luck, happy coding!