[英]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.