While working in my test environment, we have delete existing Availability group and try creating a new one with same name. Unfortunately It was failing with error “Failed to create availability group ‘SQL AAG’, because a Windows Server Failover Cluster (WSFC) group with the specified name already exists.”
We successfully deleted existing configuration as per Microsoft & Fail-over cluster log does not give any clue about existing AAG group.
Here is the solution.
- Drop the availability group if not in previous attempt, refer
- Take backup of registry then delete key “HKEY_LOCAL_MACHINE\Cluster \HadrAgNameToldMap” from all nodes participating in cluster.
- From SQL configuration manager, uncheck ‘Enable Alwayson Availability Groups’, apply OK. Restart SQL service.
- Check the box ‘Enable Alwayson Availability Groups’ again, Apply-ok, restart SQL service.
Now you should be able to create availability group with same existing name.