我建立一個數據庫鏡像,然後使用該connectionstring
連接到它:如何在故障轉移後連接到鏡像SQL Server?
Data Source={0};Failover Partner={1};Initial Catalog=AdventureWorks;
Integrated Security=True;
添加一些數據到數據庫中,我關閉主體服務器,所以鏡像服務器成爲主要服務器之後。我再次打開連接,出現此錯誤:
System.Data.SqlClient.SqlException: A transport-level error has
occurred when sending the request to the server. (provider: Shared Memory
Provider, error: 0 - No process is on the other end of the pipe.)
我認爲與故障轉移合作伙伴連接字符串中指定,ADO.NET會做的工作對我來說。那麼我現在該做什麼?
這個問題很緊迫。非常感謝你的幫助。
應指定是否有證人或如果這是一個手動故障轉移配置(你只能得到,如果你有一個證人的自動故障轉移。看到http://technet.microsoft.com/ EN-US /庫/ ms189852(SQL.90)的.aspx)。您還應該檢查Principal和Failover上的數據庫狀態。 – 2010-02-04 15:51:33
你在使用什麼提供商? – gbn 2010-02-04 15:55:55
@doug_w:我通過T-SQL手工檢查,一切正常:) @gbn:我正在使用ADO.NET – Vimvq1987 2010-02-04 15:58:42