?
Solved

SQL Server 2012 Availability Group Failover

Posted on 2014-02-14
1
Medium Priority
?
284 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 28

Accepted Solution

by:
Ryan McCauley earned 2000 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

649 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