【发布时间】:2012-08-03 13:18:57
【问题描述】:
我们有一个为镜像配置的 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 不支持故障转移合作伙伴,但我使用的是 framework 3.5 SP1。
谢谢!
【问题讨论】:
标签: vb.net sql-server-2008-r2 mirroring