我们已为镜像配置了SQL Server。最初的服务器今天出现了故障,除了VB.NET应用程序之外,几乎所有的应用程序都正确地进行了故障转移。
当它开始设置连接字符串时,我得到以下错误:
"Keyword not supported: 'failover partner:sql-failover;initial catalog'."以下是用于连接的代码:
Dim sConnectionString As String
Dim sServer As String
Try
'Always connect to production server to get startup environment variables
If gbIsProduction Then
If gsProductionServer = "" Then
sServer = "PROD-SQL"
Else : sServer = gsProductionServer
End If
Else : sServer = gsDevelopmentServer
End If
sConnectionString = "Data Source=" & sServer & ";Failover Partner:SQL-FAILOVER;Initial Catalog=*****;User ID=****;Password=******;"
cnSystem.ConnectionString = sConnectionString
cnSystem.Open()
cmdSystem.Connection = cnSystem
Catch ex As Exception
RaiseError("", "modGeneral." & System.Reflection.MethodBase.GetCurrentMethod().Name, Err.Number, Err.Description)有什么原因吗?我知道故障转移伙伴在.NET 1.1中不受支持,但我使用的是Framework3.5 SP1。
谢谢!
发布于 2012-08-03 21:22:18
这部分连接字符串是错误的
....;Failover Partner:SQL-FAILOVER;.....应该是
....;Failover Partner=SQL-FAILOVER;......https://stackoverflow.com/questions/11796549
复制相似问题