Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Windows Cluster with AG Expand / Collapse
Author
Message
Posted Thursday, June 20, 2013 2:29 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 9:16 AM
Points: 1,391, Visits: 644
So I have a 2012 windows cluster with three nodes. Each node has sql 2012 Enterprise sp1. We have been playing around in our lab environments trying things out, and we blew it up. The listener points to the primary sql server, but the windows cluster points to a secondary. Also in cluster manager it shows current host server as our secondary as well. I am trying to figure out what needs to be done to get the current host back to the primary. I have tried a few things, including this: http://technet.microsoft.com/en-us/library/ee461002.aspx No luck.
Post #1465938
Posted Friday, June 21, 2013 3:12 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, November 11, 2014 2:15 AM
Points: 187, Visits: 395
Have you read these documents they are very handy

http://download.microsoft.com/download/D/2/0/D20E1C5F-72EA-4505-9F26-FEF9550EFD44/Building%20a%20High%20Availability%20and%20Disaster%20Recovery%20Solution%20using%20AlwaysOn%20Availability%20Groups.docx

http://www.sqlservercentral.com/articles/AlwaysOn/91408/
Post #1466099
Posted Friday, June 21, 2013 4:14 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, January 6, 2014 6:24 AM
Points: 6, Visits: 49
Hi Sarah,

A recap and some clarifying questions I have for you:

- You have a three node Windows Server Failover Cluster
- You have three SQL Server instances - one per node? And are they standalone instances or Failover Cluster Instances?
- You created an Availability Group that spans all three SQL Server instances?
- Which instance hosts the read-write replica and which WSFC node does that instance currently "live" on?
- You created an AG Listener associated with the Availability Group
- Can you clarify what you mean by "windows cluster points to secondary"? You're seeing that the AG resource in Failover Cluster Manager is owned by a SQL Server instance hosting a secondary replica?

Thanks,

Joe
Post #1466110
Posted Friday, June 21, 2013 7:26 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 9:16 AM
Points: 1,391, Visits: 644
- You have a three node Windows Server Failover Cluster -- Yes
- You have three SQL Server instances - one per node? And are they standalone instances or Failover Cluster Instances? -- Standalone, one per node
- You created an Availability Group that spans all three SQL Server instances? - Yes one AG with 2 databases
- Which instance hosts the read-write replica and which WSFC node does that instance currently "live" on? -- Should be TestSql01
- You created an AG Listener associated with the Availability Group -- Yes AO01
- Can you clarify what you mean by "windows cluster points to secondary"? You're seeing that the AG resource in Failover Cluster Manager is owned by a SQL Server instance hosting a secondary replica? -- Cluster manager it says "Current Host Server: TestSql02", so when I connect in SSMS to the listener and do @@servername I get TestSql01, when I use the cluster name I get TestSql02.
Post #1466177
Posted Friday, June 21, 2013 7:44 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, January 6, 2014 6:24 AM
Points: 6, Visits: 49
So if you go in Failover Cluster Manager and expand "Services and Applications" and click on the Availability Group name - what do you see under "Current Owner" vs. "Preferred Owners"?

Assuming you have not configured read-only routing, and you're using the AG Listener name to connect via SQL Server Management Studio, you should be landing on the read-write primary replica - and you'll see the SQL Server instance hosting that replica via @@SERVERNAME.
Post #1466185
Posted Friday, June 21, 2013 8:20 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 9:16 AM
Points: 1,391, Visits: 644
We were able to resolve this by in the Failover Cluster Manager navigating from the cluster name to More Actions -> Move Core Cluster Resources -> Select Node and picking SQL01. Not sure why powershell wouldn't work.
Post #1466207
Posted Friday, June 21, 2013 8:31 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, January 6, 2014 6:24 AM
Points: 6, Visits: 49
For availability groups - you don't want to manage them using Failover Cluster Manager - you want to manage them using T-SQL commands.

I suspect we have a mismatch on what we're discussing (using different terminology).

An example hierarchy...

Windows Server Failover Cluster (WSFC)

WSFC Node 1
SQL Instance 1
Availability Group 1 - Primary (read-write) Replica
Database 1
Database 2

WSFC Node 2
SQL Instance 2
Availability Group 1 - Secondary Replica (Read-Only or Not)
Database 1
Database 2

WSFC Node 3
SQL Instance 3
Availability Group 1 - Secondary Replica (Read-Only or Not)
Database 1
Database 2

And "Availability Group 1" would have a listener associated with it. If connecting to the listener without read-only routing enabled, you'll connect to the primary read-write replica. In this example, I would have connected to "SQL Instance 1" on WSFC Node 1.
Post #1466215
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse