Client-side redirect problem  
Author Message
Will Buchanan





PostPosted: .NET Framework Data Access and Storage, Client-side redirect problem Top

If I unplug my primary server from the network, the client side redirect fails to work.

I have the connection string “Data Source=primaryserver;Failover Partner=backupserver;….”. If the data source machine is not present on the network I get the error “An error occurred while establishing a connection to the server. When connecting to SQL Server 2005….”. It seems to work fine as long as the machine is connected to the network (e.g. if the SQL Server service is shut down and I have failed over onto the backup server).

< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />Any ideas



.NET Development16  
 
 
Luis Bonilla





PostPosted: .NET Framework Data Access and Storage, Client-side redirect problem Top

Hi Will,

Did you ever have any luck with this I seem to be having a similar problem.

I connect to my primary database and then start writing transactions every second. Then i force a failover to my mirror and my application fails. I read that you are supposed to attempt to reconnect whenever you encounter a failover but this still isn't working for me.

Any help would be great. Thanks


 
 
Will Buchanan





PostPosted: .NET Framework Data Access and Storage, Client-side redirect problem Top

Hi

Sorry - I didn't have any luck with this. I raised a report with MS but they never got round to looking at it (surprise!).

Will


 
 
alazela





PostPosted: .NET Framework Data Access and Storage, Client-side redirect problem Top

Have you applied the patch from this KB article to the client machine

http://support.microsoft.com/kb/912151/



 
 
Luis Bonilla





PostPosted: .NET Framework Data Access and Storage, Client-side redirect problem Top

I just tried it but it didn't work for me. It was a great suggestion though and I was hoping that was actually it.

Here is the error information that I'm getting whenever I failover to my failover partner.

ErrorCode = -2146232060
Error Message = "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"
Error Number = -1

I have already verified that Remove Connections is enabled on both SQL servers.


 
 
CommonGenius.com





PostPosted: .NET Framework Data Access and Storage, Client-side redirect problem Top

Have you verified that you are able to connect to the backup server under normal circumstances, i.e. not in a fail-over condition

 
 
Luis Bonilla





PostPosted: .NET Framework Data Access and Storage, Client-side redirect problem Top

Yes, I can connect to the backup server under normal conditions.
 
 
alazela





PostPosted: .NET Framework Data Access and Storage, Client-side redirect problem Top

Producing a trace of the connection attempt may provide more information as to what is going on. Here's a page that details how to set up a trace: http://msdn2.microsoft.com/en-us/library/ms971550.aspx

You'll need to turn on the advanced options (0x86) for both System.Data and System.Data.Sni.