Sql-server – Setting up log shipping with an availability group

availability-groupslog-shippingsql serversql-server-2012

In my production environment I have a SQL Server 2012 AlwaysOn AG.

The Server1 there is database "MessagesDB" and in an AG to secondary Server2 (in synchronous mode).

I want to setup log shipping from Server1.MessagesDB to a data warehouse (Server3).

Is it possible?

Best Answer

Robert Douglas describes the exact solution to my problem in his post:

Why log shipping backups fail in an Always On Availability Group – Resolved

Robert writes:

...the availability group was trying to enforce a backup being taken off the secondary replica, and the log shipping job didn’t like that.

Here's how to correct it.

  1. In Management Studio expand AlwaysOn High Availability and then Availability Groups.
  2. Right click on your chosen group and choose properties.
  3. In the left pane select backup preferences.
  4. Select 'Primary' as your backup source. Click Okay.