SQL Server with Mr. Denny

Apr 19 2012   2:00PM GMT

AlwaysOn and your application source code

Denny Cherry Denny Cherry Profile: Denny Cherry

One of the things that people will need to change to their applications when using AlwaysOn under SQL Server 2012 will be that the applications will need to have retry logic added to the application so that if the SQL Server is down that the application can retry the connection.

Now this shouldn’t be anything new to the application developers as even today there’s nothing that says that the SQL Server database will always be available.  Instead of failing the application on the first connection attempt, or the first time that the command was run, the command should be rerun, probably a couple of times.  Now if the error that you get back is from the SQL Server itself you don’t want to retry.  You’ll only want to retry if the database was up and you got back a normal error message.

If you are working with SQL Azure this same logic applies to your application there as well.

While I’d love to provide you with some sample source code here, I’m not a .NET developer and the last thing that you want me doing is writing .NET source code so I’ll leave that for the .NET professionals.

Denny

1  Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • bugme
    Take a look at [A href="http://windowsazurecat.com/2010/10/best-practices-for-handling-transient-conditions-in-sql-azure-client-applications/"]Best Practices for Handling Transient Conditions in SQL Azure Client Applications[/A] and the sample code: http://code.msdn.microsoft.com/Transient-Fault-Handling-b209151f
    80 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: