Showing posts with label Always On. Show all posts
Showing posts with label Always On. Show all posts

Sunday, 29 January 2017

Clusters, listeners, always on, VNNs, VCO, WSFC, AGLs, VIPs, WTF? How does all this stuff fit together?

I put together some notes on Clusters, listeners, always on etc just to clear things up in my own mind:


The cluster name object (CNO) is an Active Directory computer object linked with the network resource Cluster Name (the Windows Cluster)

The Availability Group Listeners are registered as Cluster Resources - and in Active Directory as Virtual Computer Objects (VCOs)

The cluster name account requires the "Create Computer objects" permission when you create a clustered service or an application. When the cluster name account does not have
this permission, SQL Server cannot create the availability group listener

When you create a new availability group listener it becomes a resource in a cluster with an associated virtual network name (VNN), Virtual IP (VIP) - and Availability Group

Listeners are registered as Cluster Resources
  
This is how The Listener is related to the cluster – it is registered as a cluster resource when it is created
  
The listener leverages the Windows Failover Cluster (WSFC) for its functionality; you cannot create the listener without the cluster already existing as the cluster itself creates the listener. As such, it is Active Directory (AD) that hosts it and the nodes that use the cluster can use any services that cluster has, in this case the listener.

Essentially someone creates the cluster, and if there are proper AD permissions then it creates the Availability Group (AG) within the cluster, and then the listener within the AG when those are created

The Availability Group Listener (AGL) is part of the AG's Windows Server Failover Cluster (WSFC) Resource. It is a Virtual Network Name with n number of IP addresses. Being in a cluster resource it will only run on a single node of the WSFC and that node will be the primary node of the AG. It is not a thread within SQL Server. The WSFC handles the failover of the AG resource and the AG databases will not come online without the AG resource residing on its node of the WSFC.
The listener just handles connection forwarding. When connecting to the read/write replica the connection will hit the listener and then the listener will tell the client to connect to the primary replica's IP address. In the case of read-only routing it will follow the below work flow

Tuesday, 27 December 2016

setting MAXMEM on servers in an Always On group


  1. No restarts required
  2. Use the following to set MAXMEM to 60GB (SQL had 64GB RAM so we left 4GB for the OS)

Enable advanced options:
USE master
EXEC sp_configure 'show advanced options', 1
RECONFIGURE WITH OVERRIDE

Set the maximum amount of memory to 64 MB:
USE master
EXEC sp_configure 'max server memory (MB)', 
61440
RECONFIGURE WITH OVERRIDE

Then refresh SSMS and review updated value in Properties



Sunday, 11 December 2016

Managing SharePoint: Truncating the Log file on the Always On secondary

Had an issue where the backup had stopped running and the transaction logs were full

How to resolve this is an always on environment?

  1. On the Primary: Set the recovery model of the Config DB to Simple
  2. Full backup
  1. Remove from Availability group - now the configDB exists on Primary but it is not synching to the Secondary

  1. On the Secondary: Delete the config DB

Did you just say delete the config DB??? - Yes, it's on the secondary. It's ok. The Primary isrunning and not in the AG

  1. On the Primary: Shrink the Log files to 1,024MB - just the logs
  2. Add the Config DB back to the AOAG

And all was well again - time for a coffee

SharePoint Information Architecture Diagram

Here is the template I use for Information Architecture designs. It's built using Mindjet and I flesh the nodes out with the low level d...