Showing posts with label SQL Server. Show all posts
Showing posts with label SQL Server. Show all posts

Monday, November 5, 2012

Failed to Create Availability Group, SQL Server error 41042 encountered

Wow, it's been close to six months since my last post!!! Where has the time gone?

Anyway, I ran into an issue that no amount of Google-fu seemed to help me with. The issue was "Microsoft SQL Server, Error: 41042". I ran into this problem trying to create an Availability Group using the name of an AG that had been previously deleted, but appears to have not been completely removed. Here's a screengrab for the error:



As stated, this was an AG name for an AG that had existed and was gone from SQL Server.... but hadn't disappeared from the "Failover Cluster Manager." So I deleted the AG's service manually from the Failover Cluster manager.  



This appeared to do the trick, but then I got the error. So what to do????? As I mentioned, I checked google profusely to no avail. And after thinking for a bit, decided that this had to be a registry issue. I did some googling to determine where SQL Server Availability Group Registry keys live, and found the following excerpt from http://msdn.microsoft.com/en-us/library/ff929171.aspx:


In the registry I navigated to HKLM\Cluster\HADRAgNameToIDMap, and found the AG name I was trying to use. I deleted the key, and reran the AG wizard and.... still no luck. So I decided to do this on every node that had been a part of the AG and... Voila!!!! IT WORKED!!!


Now remember, use this at your own risk.

Thursday, September 13, 2012

Availability Group Listener's IP address keeps changing between Online and Offline address

I've been testing Multi-Subnet Availability Groups and I ran into a peculiar situation which I hadn't experienced before; the IP address kept flipping between the offline and online IP address for the resource.

I was a little perplexed, I had tested Multi-Subnet AGs on our old Colocation, and was now testing it with our new (and improved) colo. I tried lots of things, but it came down to one cluster resource setting for my AG... RegisterAllProvidersIP.

When this setting is set to 1, any IP address that is associated with the clustered resource. As shown below:

This means that dns will return either IP address, and your client could fail connecting if the offline IP address is returned by DNS after the TTL timer expires.

By setting RegisterAllProvidersIP to 0, only the online IP address is registered. Success!!