【问题标题】:NHibernate w/ database mirroring via Failover Partner in connection stringNHibernate w/通过连接字符串中的故障转移伙伴进行数据库镜像
【发布时间】:2012-03-24 08:21:03
【问题描述】:

我会先说我正在使用NHibernate v3.2
假设我有一个如下的连接字符串(这里的关键是Failover Partner):

Data Source=Server1\Instance;Failover Partner=Server2\Instance;Initial Catalog=MyDb;Integrated Security=True;

我在hibernate论坛中发现了以下与该主题相关的文章:
https://forum.hibernate.org/viewtopic.php?f=25&t=979764

一位用户提到以下内容:
We had a slight hiccup with the way we were caching our NHibernate session and had to add a method that verifies the session's connection is still open when we pull it out of the call context.

NHibernate 是否支持开箱即用的数据库镜像选项,因为它使用 ADO.net?
在使用连接时我需要注意什么特殊情况像这样的字符串?

【问题讨论】:

    标签: hibernate nhibernate


    【解决方案1】:

    它支持这一点,并在使用 3.2 的测试和生产系统中向我自己证明了这一点。它也适用于 3.3。

    我唯一需要注意的是通过读取配置设置在页脚中显示数据库服务器。这仍然会显示数据源,并且在使用故障转移伙伴时没有找到一种简单的显示方式。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-15
      • 2015-10-28
      • 2014-08-24
      • 1970-01-01
      • 2011-01-25
      • 2010-10-09
      相关资源
      最近更新 更多