Search

SQL Server 2012 - Log Shipping from a database that is part of an availability group by Neil Matthewson

Active

1
0
Sign in
to vote
Type: Bug
ID: 773419
Opened: 12/4/2012 6:37:49 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
When log shipping a database that is part of an availability group, although all jobs succeed a trn file is not produced. Therefore it is not copied, nor is it restored.

An example of it not being produced;


NULL
Microsoft (R) SQL Server Log Shipping Agent
[Assembly Version = 11.0.0.0, File Version = 11.0.2100.60 ((SQL11_RTM).120210-1917 )]
Copyright (c) 2012 Microsoft. All rights reserved.
NULL
2012-11-17 12:44:42.93 ----- START OF TRANSACTION LOG BACKUP -----
2012-11-17 12:44:43.00 Starting transaction log backup. Primary ID: '0a6c7977-a1e3-4967-b4c6-ee88482ab1c4'
2012-11-17 12:44:43.01 Retrieving backup settings. Primary ID: '0a6c7977-a1e3-4967-b4c6-ee88482ab1c4'
2012-11-17 12:44:43.03 Retrieved backup settings. Primary Database: 'ABC', Backup Directory: '\\ABCDB04\pendingv$\ABC', Backup Retention Period: 240 minute(s), Backup Compression: Server Default
2012-11-17 12:44:43.15 Deleting old log backup files. Primary Database: 'ABC'
2012-11-17 12:44:43.16 The backup operation was successful. Primary Database: 'ABC', Log Backup File: ''
2012-11-17 12:44:43.17 ----- END OF TRANSACTION LOG BACKUP -----
NULL
Exit Status: 0 (Success)
NULL


The workaround is to select 'Primary' under backup preferences.


NULL
2012-11-17 12:46:07.00         ----- START OF TRANSACTION LOG BACKUP -----
2012-11-17 12:46:07.05         Starting transaction log backup. Primary ID: '0a6c7977-a1e3-4967-b4c6-ee88482ab1c4'
2012-11-17 12:46:07.05         Retrieving backup settings. Primary ID: '0a6c7977-a1e3-4967-b4c6-ee88482ab1c4'
2012-11-17 12:46:07.07         Retrieved backup settings. Primary Database: 'ABC', Backup Directory: '\\ABCDB04\pendingv$\ABC', Backup Retention Period: 240 minute(s), Backup Compression: Server Default
2012-11-17 12:46:07.15         Backing up transaction log. Primary Database: 'ABC', Log Backup File: '\\ABCDB04\pendingv$\ABC\ABC_20121117104607.trn'
2012-11-17 12:46:07.28         Deleting old log backup files. Primary Database: 'ABC'
2012-11-17 12:46:07.31         The backup operation was successful. Primary Database: 'ABC', Log Backup File: '\\ABCDB04\pendingv$\ABC\ABC_20121117104607.trn'
2012-11-17 12:46:07.33         ----- END OF TRANSACTION LOG BACKUP -----
NULL
Exit Status: 0 (Success)
NULL




This is ambiguous since these backup preferences are being sold as full backup options imo, and yet with this selected I can still go and perform a backup on a secondary server.
Details (expand)

Product Language

English

Version

SQL Server 2012 - Enterprise Edition

Category

SQL Engine

Operating System

Windows Server 2008 R2 Enterprise

Operating System Language

English

Steps to Reproduce

Attempt to log-ship from a database that is in an availability group, with the default backup preference - Prefer Secondary - selected.

Actual Results

A trn file is not produced. Therefore it is not copied, nor is it restored.



NULL
Microsoft (R) SQL Server Log Shipping Agent
[Assembly Version = 11.0.0.0, File Version = 11.0.2100.60 ((SQL11_RTM).120210-1917 )]
Copyright (c) 2012 Microsoft. All rights reserved.
NULL
2012-11-17 12:44:42.93 ----- START OF TRANSACTION LOG BACKUP -----
2012-11-17 12:44:43.00 Starting transaction log backup. Primary ID: '0a6c7977-a1e3-4967-b4c6-ee88482ab1c4'
2012-11-17 12:44:43.01 Retrieving backup settings. Primary ID: '0a6c7977-a1e3-4967-b4c6-ee88482ab1c4'
2012-11-17 12:44:43.03 Retrieved backup settings. Primary Database: 'ABC', Backup Directory: '\\ABCDB04\pendingv$\ABC', Backup Retention Period: 240 minute(s), Backup Compression: Server Default
2012-11-17 12:44:43.15 Deleting old log backup files. Primary Database: 'ABC'
2012-11-17 12:44:43.16 The backup operation was successful. Primary Database: 'ABC', Log Backup File: ''
2012-11-17 12:44:43.17 ----- END OF TRANSACTION LOG BACKUP -----
NULL
Exit Status: 0 (Success)
NULL

Expected Results

The log shipping exe should be able to execute a backup log and produce a trn file regardless of the backup setting Primary being selected. After all, a backup log command can be issued on any secondary, and the log will still be truncated on the primary.
Additionally, a secondary copy_only backup should not be able to occur if the Primary only option is selected, and yet it can.
Log shipping will not function correctly with any of the other backup preferences selected.

Microsoft need to properly clarify what these backup preferences are for and/or change the sqllogship.exe to not depend on the 'Primary' backup preference.

Platform

X64

Virtualization

 
File Attachments
0 attachments
Sign in to post a comment.
Sign in to post a workaround.