我建立一个数据库镜像,然后使用该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