AlwaysOn and your application source code

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

Share

One Response

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Trust DCAC with your data

Your data systems may be treading water today, but are they prepared for the next phase of your business growth?