gpt4 book ai didi

sql-server - 连接字符串 USING Application Intent 错误

转载 作者:行者123 更新时间:2023-12-03 08:25:16 24 4
gpt4 key购买 nike

尝试创建针对 SQL Server 2012 高可用性组的“只读”意图连接字符串,遵循 this article ,我得到:

System.ArgumentException: Keyword not supported: 'application intent'. at System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey)

这是在 Windows 7 Pro 机器上,违背基于 SQL Server 2012 的高可用性组(已确认可使用“-ReadOnly”参数)。

有两篇关于引入“应用程序意图”的修补程序的 MS 知识库文章,但它们适用于框架版本 3.54 . 我没有为 4.5 找到任何东西,所以我认为包含支持 。两个4.5SQL Server Native Client应该开箱即用地支持它。

我们使用的是 4.5。

这是连接字符串:

Data Source=HAListener;Initial Catalog=*********;User ID=************;Password=********; Application Intent=ReadOnly

有人遇到过这个错误吗?

已解决Application Intent 中不应有任何空格:

ApplicationIntent=ReadOnly

最佳答案

我想我会发布解决方案以防其他人遇到同样的问题:

Application 和 Intent 之间没有空格。正确的参数是:

ApplicationIntent=ReadOnly

(引用:MSDN)

关于sql-server - 连接字符串 USING Application Intent 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21190432/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com