【问题标题】:What does ApplicationIntent=ReadOnly mean in the connection stringApplicationIntent=ReadOnly 在连接字符串中是什么意思
【发布时间】:2013-02-27 03:47:47
【问题描述】:

我正在使用 MS Access 通过 DSN 连接连接到 Sql Server。这是一个到 sql server 后端的链接表。这是连接字符串

ODBC;DSN=mydsn;Description=mydesc;Trusted_Connection=Yes;APP=Microsoft Office 2010;DATABASE=mydb;ApplicationIntent=READONLY;;TABLE=dbo.mytable

如您所见,连接字符串中有一个ApplicationIntent=READONLY 标记。这是什么意思。我是否以只读方式连接到数据库?是否建议使用此连接字符串执行更新和插入?

【问题讨论】:

    标签: sql-server ms-access


    【解决方案1】:

    这意味着如果您在 SQL Server 2012 中使用可用性组,引擎知道您的连接是只读的,并且可以路由到只读副本(如果存在)。这里有一些信息:

    Configure Read-Only Access on an Availability Replica

    Availability Group Listeners, Client Connectivity, and Application Failover

    如果您当前没有使用可用性组,可能将其保留在其中以实现前向兼容性是个好主意,但这实际上取决于您是否故意只是阅读。这应该可以防止写入,但有一些警告。这些 Connect 项目可能有用,也可能会让您摸不着头脑。我承认我还没有读完。

    ApplicationIntent=ReadOnly allows updates to a database

    ApplicationIntent=ReadOnly does not send the connection to the secondary copy

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-05-19
      • 2013-01-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-09-13
      • 2018-08-28
      • 1970-01-01
      相关资源
      最近更新 更多