Link to home
Start Free TrialLog in
Avatar of Larry Brister
Larry BristerFlag for United States of America

asked on

Server down redirect

Hey folks,
  I'm using SQL Database as my datasource.  What is the best method to look at a different server if server one is down.

I need to do this in VB code behind inthe Master file I guess.
Avatar of Daniel Wilson
Daniel Wilson
Flag of United States of America image

The best solution is a SQL Server cluster so that your app doesn't ahve to deal with this.  But ... doing this in the code-behind shouldn't be too hard -- as long as you're just trying to read.

Somewhere ... maybe actually in a page from which your content pages inherit ... you could put a Connection property.

This property would:
* Instantiate a SqlConnection, if not already done
* Attempt to connect to the primary DB server
* If that fails, attempt to connect to the second DB server
* Return the connection

Think that will work for you?



Avatar of Larry Brister

ASKER

DanielWilson:
Yes...that would work.  You have an example?
ASKER CERTIFIED SOLUTION
Avatar of Daniel Wilson
Daniel Wilson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks.  This put me on the track I needed.