Solved

SQL Server 2012 Availability Group Failover

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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
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.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how the fundamental information of how to create a table.

707 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