1
我們配置了一個用於鏡像的SQL Server。最初的服務器今天失敗了,幾乎所有的應用程序都失敗了,除了VB.NET應用程序。不支持的關鍵字:VB.NET中的'failover partner:sql-failover;初始目錄'
在啓動時設置連接字符串,我得到以下錯誤:
"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中不支持故障轉移合作伙伴,但我使用的是框架3.5 SP1。
謝謝!
是啊,我剛纔看到的,謝謝。現在,連接字符串得到了正確的驗證,但它並沒有跳到故障轉移服務器。它是否必須與初始服務器建立成功連接才能進行故障轉移? – Tom 2012-08-03 13:24:47
不知道[this](http://support.microsoft.com/kb/941526)文章是否有幫助。 – Steve 2012-08-03 13:42:14