Sql-server – SQL Server – Log Shipping Into an AlwaysOn Availability Group

availability-groupssql serversql-server-2008-r2sql-server-2012

I have a requirement to build an AlwaysOn Availability Group, which I have done. Now the user wants me to set up log shipping from another server into the AlwaysOn Availability Group. I’m not sure how to approach this or if it is even possible.

The AlwaysOn Availability Group is on SQL Server 2012 SP2, running on a Windows 2012 R2 cluster. The source of the log shipping is SQL Server 2008 R2 SP2, running on Windows 2008 R2.

What is happening is that we are converting from the SS 2008 database to SS 2012 on new hardware. The customer wants the SS 2012 to be AlwaysOn for HA. They also want to be able to set it all up in advance and migrate the data from the SS 2008 database in as little time as possible, which is why they asked for log shipping. What I suggested was to build the SS 2012 without AlwaysOn, do log shipping from the SS 2008, then set up AlwaysOn at cutover time, but there is still an outage as it builds the secondary and they don't like that, either.
Does anyone know of a quick way to copy the data from the SS 2008 database to the SS 2012 database, with AlwaysOn already running? I'm getting a lot of pressure to make this happen with very little downtime.

Best Answer

The database on the end of log shipping has to be in NORECOVERY to accept the log backups being shipped over. A database involved in AlwaysOn Availability Group has to be removed from the group in order to be restored or set to any restoring state. So setting up log shipping to that database would require it to no longer being replicated.

I would go back to the stockholders and determine their full needs for HA as it seems they left stuff out of their initial request.