Solved

SQL Server 2012 Availability Group Failover

Posted on 2014-02-14
1
260 Views
Last Modified: 2014-02-24
I have an SQL Server 2012 Availability Group set up across two data centers.  The Availability Group has five databases in it.  I have a process that begins to load data into one of the databases on the primary replica.  When I failover the availability group and make the secondary replica primary, the process reports that the database is read only.  In addition, if I begin a new process attempting to load data to the new primary replica (I haven't failed the AG back yet) I get the same error, database is read only.  I can't figure out how to make my secondary databases writable in case of an automatic failover.  I believe I have all the pre-requisits taken care of.  I've tried to alter the read intent of the secondary databases using the the availability group wizard but I still get the same result.  Any help is appreciated.
0
Comment
Question by:navajo26354
1 Comment
 
LVL 28

Accepted Solution

by:
Ryan McCauley earned 500 total points
ID: 39868566
Are you connecting to the databases using the clustered AG name, or via their native instance names? If you connect to the AG name, it should route your update queries to the writable instance (the primary one) automatically.

The only other caveat might be if your connection string specifies read intent rather than write - can you confirm that your connection string doesn't specify intent? For more detail, you can check here:

http://blogs.msdn.com/b/alwaysonpro/archive/2013/08/02/connect-to-sql-server-using-application-intent-read-only.aspx
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now