Solved

SQL Server 2012 Availability Group Failover

Posted on 2014-02-14
1
271 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

820 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