Search code examples
sql-serverwindows-server-2016sql-server-vnext

Creating a clusterless availability group using windows server 2016 and sql server vNext CTP 1.4


I am testing configuration of availability groups(AG) with windows Server 2016 with sql server vNext CTP 1.4 within a clusterless environment. After having been to a recent conference, I have had learnt that this clusterless AG configuration is possible with the recent version of both windows OS and vNext. I have setup everything correctly (viz. HADR enable, two nodes pinging each other, endpoints, certificates, logins permissions) and within the correct parameters. Have even successfully executed the tsql script for creating the AG using CLUSTER_TYPE=None on the primary node of this AG. However, it seems that I am unable to join the secondary replica onto this AG and encountering the below screenshot error. Also, whilst creating the AG I have noticed that the secondary replica is not connected. I get the below error whilst joining the secondary to this AG.

enter image description here


Solution

  • I have now managed to rectify the error within my availability group creation by myself after having re-read through the MS docs again. Basically the error was within the AG group TSQL script I had been using to create the this Clusterless AG. Essentially it is (I think) very important to create the AG with just the syntax (CLUSTER_TYPE=NONE) within the CREATE AVAILABILITY GROUP ....TSQL and nothing else viz. (DB_FAILOVER=ON/OFF etc) and after executing the create availability group on node1..... hop over to node2(your read only replica) and execute the join syntax

    ALTER AVAILABILITY GROUP AGNAME JOIN WITH (CLUSTER_TYPE = NONE);

    Hope it helps in future for someone who's trying to scale read-only AG using the AG'less and/or cluster'less environment.