SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Full Backups


Full Backups

Author
Message
Steve Jones
Steve Jones
SSC Guru
SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)

Group: Administrators
Points: 64201 Visits: 19117
There was a slight typo in the original question, and I mistakenly added another in fixing it. It should have been:

12:10 AM - Transaction 1 on QotDDatabase begins

12:11 AM - Transaction 2 on QotDDatabase begins

12:12 AM - Transaction 2 on QotDDatabase commits

12:13 AM - Transaction 1 on QotDDatabase commits

12:14 AM - Full backup data reading of QotDDatabase begins

12:15 AM - Transaction 3 on QotDDatabase begins

12:16 AM - Transaction 3 on QotDDatabase commits

12:18 AM - Full backup data reading of QotDDatabase ends

12:19 AM - Transaction 4 on QotDDatabase begins

12:20 AM - Full backup of QotDDatabase ends

12:21 AM - Transaction 4 on QotDDatabase commits

In this case, 1, 2, and 3 are included, 4 is not as it starts after the data reading portion of the backup ends. I'll award back points to people since it was confusing.

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
Cliff Jones
Cliff Jones
SSCarpal Tunnel
SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)

Group: General Forum Members
Points: 4295 Visits: 3648
Miles Neale (7/20/2012)
I answered that only the answer of 2 was correct. All others had to be wrong since 1 never completes. I do not care about the rules of the entire backup process and all the conversation here about such, (which is great by the way and very educational). The answers were all predicated by the transactions listed in those answers. Only 2 was the most correct, it was the only one that was completely correct. To say that 1 ever was included in the backup is truly false, it had not committed at the completion of the backup so all answers that included 1 are false.

Someone needs to adjust the points on this one,

Yes, that was how I stumbled upon the "correct" answer. None of them seemed to be correct and then noticed 2 commits for transaction 2 and assumed ...
krystian
krystian
SSC Rookie
SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)

Group: General Forum Members
Points: 35 Visits: 77
The question was which transaction changes will be contain in the full backup?

In my understanding all transaction changes until the point where backup finish are recorded in the backup file. Since transaction 4 committed after backup was finish therefore only the changes up to the point of backup finished from transaction 4 will be recorded.

Another story is when backup is used to restore database from backup file then ALL changes for transaction 4 contained in backup file will be rollback since transaction 4 did not have commit statement as other three transaction have.

Regards

Krystian
Steve Jones
Steve Jones
SSC Guru
SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)

Group: Administrators
Points: 64201 Visits: 19117
krystian (7/20/2012)
The question was which transaction changes will be contain in the full backup?

In my understanding all transaction changes until the point where backup finish are recorded in the backup file. Since transaction 4 committed after backup was finish therefore only the changes up to the point of backup finished from transaction 4 will be recorded.



Incorrect. On a busy system, the full backup would never end and constantly have new log entries. The log up to the end of the data reading portion of the backup is included. After that point, just the log from the beginning of the backup to the end of the data reading portion is written to the backup file.

If you look at my post a few back, that is the most recent, corrected, timeline of events.

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
jeff.mason
jeff.mason
UDP Broadcaster
UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)

Group: General Forum Members
Points: 1487 Visits: 2137
Steve Jones - SSC Editor (7/20/2012)
There was a slight typo in the original question, and I mistakenly added another in fixing it. It should have been:

12:10 AM - Transaction 1 on QotDDatabase begins

12:11 AM - Transaction 2 on QotDDatabase begins

12:12 AM - Transaction 2 on QotDDatabase commits

12:13 AM - Transaction 1 on QotDDatabase commits

12:14 AM - Full backup data reading of QotDDatabase begins

12:15 AM - Transaction 3 on QotDDatabase begins

12:16 AM - Transaction 3 on QotDDatabase commits

12:18 AM - Full backup data reading of QotDDatabase ends

12:15 AM - Transaction 4 on QotDDatabase begins

12:20 AM - Full backup of QotDDatabase ends

12:21 AM - Transaction 4 on QotDDatabase commits

In this case, 1, 2, and 3 are included, 4 is not as it starts after the data reading portion of the backup ends. I'll award back points to people since it was confusing.


Sorry to be pedantic, Steve, to make sure -- you mean transaction 4 starts at 12:19, right?
jeff.mason
jeff.mason
UDP Broadcaster
UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)

Group: General Forum Members
Points: 1487 Visits: 2137
Also, you have to consider that SQL will stop a backup even if there are open transactions. I know because we have had a rogue developer who was given too much access by the CIO at my last job who more than once left a transaction open by mistake for days, but no one caught it at first because he wasn't hitting recent data (he was fixing old data). But we didn't get backup failures or backups going longer than normal, so SQL Server obviously at some point ignores open transactions and finishes the backup.
Steve Jones
Steve Jones
SSC Guru
SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)SSC Guru (64K reputation)

Group: Administrators
Points: 64201 Visits: 19117
jeff.mason (7/20/2012)
Steve Jones - SSC Editor (7/20/2012)
There was a slight typo in the original question, and I mistakenly added another in fixing it. It should have been:

12:10 AM - Transaction 1 on QotDDatabase begins

12:11 AM - Transaction 2 on QotDDatabase begins

12:12 AM - Transaction 2 on QotDDatabase commits

12:13 AM - Transaction 1 on QotDDatabase commits

12:14 AM - Full backup data reading of QotDDatabase begins

12:15 AM - Transaction 3 on QotDDatabase begins

12:16 AM - Transaction 3 on QotDDatabase commits

12:17 AM - Full backup data reading of QotDDatabase ends

12:19 AM - Transaction 4 on QotDDatabase begins

12:20 AM - Full backup of QotDDatabase ends

12:21 AM - Transaction 4 on QotDDatabase commits

In this case, 1, 2, and 3 are included, 4 is not as it starts after the data reading portion of the backup ends. I'll award back points to people since it was confusing.


Sorry to be pedantic, Steve, to make sure -- you mean transaction 4 starts at 12:19, right?


Yes, this whole thing makes my head hurt. Too hard to edit this and not make a mistake somewhere.

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
Ken Hiatt
Ken Hiatt
Valued Member
Valued Member (71 reputation)Valued Member (71 reputation)Valued Member (71 reputation)Valued Member (71 reputation)Valued Member (71 reputation)Valued Member (71 reputation)Valued Member (71 reputation)Valued Member (71 reputation)

Group: General Forum Members
Points: 71 Visits: 133
LOL

I say we throw the whole thing out like the question never existed, no one got it wrong and no one go it right. We'll just call it a free learning experience. Smile
SQLPhil
SQLPhil
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1580 Visits: 740
Ah, the benefit of turning up to this party a bit late.

Turned out to be a nice question for me on a sunny Monday morning! :-D
EL Jerry
EL Jerry
Hall of Fame
Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)

Group: General Forum Members
Points: 3990 Visits: 1345
SQLPhil (7/23/2012)
Ah, the benefit of turning up to this party a bit late.

Turned out to be a nice question for me on a sunny Monday morning! :-D

+1

Same case here. :-D

"El" Jerry.

"A watt of Ottawa" - Gerardo Galvan

To better understand your help request, please follow these best practices.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search