Around three weeks ago we've migrated from our SQL Server 2005 with mirroring setup to the brand spanking new (and way cooler) SQL Server 2012 Availability groups. Everything worked out wonderfully untill I discovered my LOG backups were not beeing created a few days ago.
I contacted Ola Hallengren (which some of the other users here are likely to know as the man who supplies us with the SQL Server Maintenance Solution; http://ola.hallengren.com/) in order to shed some light on the issue.
First let me pain you the picture, we've got two servers running SQL Server 2012 Enterprise with an Availability Group between them. The backup perferences are set up the the default; 'On secondary replicas' (http://technet.microsoft.com/en-us/library/hh245119.aspx).
This means i'd expect the LOG backups to be done on which ever of the two servers is running as a Secondary at the time of running. Now it took me longer then it should to realize but we didn't have any LOG backups beeing created at all since the migration.
Trying to pinpoint why we've come to the conclusion that sys.fn_hadr_backup_is_preferred_replica (http://technet.microsoft.com/en-us/library/hh213235.aspx) is
returning a 0 on both the servers. I've since then found the following two references;
Which happens to be pretty similar to our situation, here is how our migration took place and the "current" sitation;
- Installed two new servers with Windows 2012 and SQL Server 2012 in a testing lab.
- Both servers turned out stable and great so we're renamed to their future final names (this bit is important)
- Server were moved to the datacentre, the cluster was created & the SQL Server Availability Group was created
- Databses were migrated.
This is where we're at today, now I can tell you aswell that after reading the two references I checked our @@SERVERNAME property which holds the OLD server names (SQL-1 and SQL-2 for simplicity sake). I've since then renamed both servers to their actual name. I've yet to restart the services though, which I simply haven't had the balls to do during work hours. I'm expecting this to solve the problem from what i've read in the two references but it might be something that is reproducable in a Lab.
Surely beeing unable to make transaction backups on either server is wrong. I'm also supprised the @@SERVERNAME is used and no the values found in; sp_helpserver
I have no Idea if these forums are the right place, i've also mailed 'premier@microsoft.com' to ask how to proceed but I thought also posting on the forums might be the right way to go.
Mind you, i'm EXPECTING a restart of both services to fix the issue but I cannot at this time confirm this (hopefully after the weekend)