简体   繁体   English

ApplicationIntent = ReadOnly在连接字符串中的含义是什么

[英]What does ApplicationIntent=ReadOnly mean in the connection string

I am using MS Access to connect to Sql Server through a DSN connection. 我正在使用MS Access通过DSN连接连接到Sql Server。 This is a linked table to a sql server backend. 这是一个sql server后端的链接表。 Here is the connection string 这是连接字符串

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

As you can see there is a ApplicationIntent=READONLY tag in the connection string. 如您所见,连接字符串中有一个ApplicationIntent=READONLY标记。 What does this mean. 这是什么意思。 Am I connecting to the database in a read only fashion? 我是否以只读方式连接到数据库? Is it recommended to perform updates and inserts using this connection string? 是否建议使用此连接字符串执行更新和插入?

This means that if you are using Availability Groups in SQL Server 2012, the engine knows that your connections are read only and can be routed to read-only replicas (if they exist). 这意味着,如果您在SQL Server 2012中使用可用性组,则引擎知道您的连接是只读的,并且可以路由到只读副本(如果存在)。 Some information here: 这里的一些信息:

Configure Read-Only Access on an Availability Replica 在可用性副本上配置只读访问权限

Availability Group Listeners, Client Connectivity, and Application Failover 可用性组侦听器,客户端连接和应用程序故障转移

If you are not currently using Availability Groups, it may be a good idea to leave that in there for forward compatibility, but it really depends on whether or not you are intentionally only just reading. 如果您当前没有使用可用性组,那么将其留在那里以获得向前兼容性可能是个好主意,但这实际上取决于您是否故意只是阅读。 This should prevent writes but there are some caveats. 这应该可以防止写入,但有一些警告。 These Connect items may be useful or may leave you scratching your head. 这些连接项可能有用,或者可能让您挠头。 I'll confess I haven't read them through. 我承认我还没看过。

ApplicationIntent=ReadOnly allows updates to a database ApplicationIntent = ReadOnly允许更新数据库

ApplicationIntent=ReadOnly does not send the connection to the secondary copy ApplicationIntent = ReadOnly不会将连接发送到辅助副本

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用pymssql时如何传递连接参数“ ApplicationIntent = ReadOnly” - How to pass connection parameter “ApplicationIntent=ReadOnly” when using pymssql localsql 在连接字符串中是什么意思? - What does localsql mean in connection string? 如何为 Azure SQL 上的弹性查询设置 CONNECTION_OPTIONS = 'ApplicationIntent=ReadOnly'? - How to set the CONNECTION_OPTIONS = 'ApplicationIntent=ReadOnly' for elastic queries on Azure SQL? 在OLEDB连接字符串中,数据源为DATASOURCE = {0}是什么意思? - In OLEDB Connection string ,data source is DATASOURCE = {0} What Does it Mean? ApplicationIntent=ReadOnly 与 SQL Server 导入和导出向导 - ApplicationIntent=ReadOnly with SQL Server Import and Export Wizard 带有ApplicationIntent ReadOnly的Azure SQL Server弹性查询 - Azure SQL Server Elastic query with ApplicationIntent ReadOnly 使用ApplicationIntent = ReadOnly和将数据插入临时表的存储过程 - Using ApplicationIntent=ReadOnly with stored procedures which insert data to temp tables 如何在SQL命令中的Powershell代码中使用ApplicationIntent = ReadOnly - How to use ApplicationIntent=ReadOnly inside my powershell code in SQL command 在 ApplicationIntent=ReadOnly 开启的情况下对链接服务器数据库使用 SELECT - Using SELECT against a linked server database with ApplicationIntent=ReadOnly turned on 连接字符串中的 MultipleActiveResultSets 是什么? - What does MultipleActiveResultSets in connection string?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM