Peuge
Peuge

Reputation: 1491

Connect timeout, database failover not working

I have implemented database mirroring on Azure with a witness, using SQL Server 2008. The mirroring / failover works on the SQL Server side. The problem I am having is that once a failover has occurred my asp.net Website does not connect to the new principle database and is still trying to connect the the old principle.

I have tried adding a 60s Connect Timeout to my connection string as suggested in this post. However this does not have any effect. And all I end up getting is the following error after around 60s:

Request timed out.

Does anyone have any other suggestions?

Any help much appreciated!

EDIT

My connection string is:

data source=server1;Failover Partner=server2;initial catalog=DBNAME;User Id=WebsiteUser; Password=******;Connect Timeout=60;multipleactiveresultsets=True

Upvotes: 0

Views: 1636

Answers (1)

eFloh
eFloh

Reputation: 2158

did you add the failover partner to the connection string? see http://blogs.msdn.com/b/spike/archive/2010/12/08/clarification-on-the-failover-partner-in-the-connectionstring-in-database-mirror-setup.aspx for example and clarification

Upvotes: 0

Related Questions