﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by Paul Randal  / Transaction Log Backups / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 21 May 2013 01:09:10 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Transaction Log Backups</title><link>http://www.sqlservercentral.com/Forums/Topic862180-2616-1.aspx</link><description>Never get tired of this sort of question - it is such an important topic.</description><pubDate>Tue, 30 Mar 2010 08:54:39 GMT</pubDate><dc:creator>Paul White</dc:creator></item><item><title>RE: Transaction Log Backups</title><link>http://www.sqlservercentral.com/Forums/Topic862180-2616-1.aspx</link><description>Great question... got this one wrong but that's how we learn!</description><pubDate>Thu, 11 Feb 2010 12:51:53 GMT</pubDate><dc:creator>Steve Vassallo</dc:creator></item><item><title>RE: Transaction Log Backups</title><link>http://www.sqlservercentral.com/Forums/Topic862180-2616-1.aspx</link><description>got this wrong, I answered A. No transaction log...:(Reason being is that the question mentioned... regardless of recovery model.... I thought that a database with a Simple Recovery model did not use a transaction log, and therefore not back up a transaction log (which would rule out all other answers as they involve backing up parts of the transaction log)</description><pubDate>Wed, 10 Feb 2010 22:15:22 GMT</pubDate><dc:creator>peterj-863281</dc:creator></item><item><title>RE: Transaction Log Backups</title><link>http://www.sqlservercentral.com/Forums/Topic862180-2616-1.aspx</link><description>@Paul,Great question as expected from you. thanks.</description><pubDate>Wed, 10 Feb 2010 03:05:21 GMT</pubDate><dc:creator>arr.nagaraj</dc:creator></item><item><title>RE: Transaction Log Backups</title><link>http://www.sqlservercentral.com/Forums/Topic862180-2616-1.aspx</link><description>With all due respect Ted, you dreamed everything you described above :-) It doesn't do any of that except the checkpoint at the start, and that's just to flush out as many dirty pages from the buffer pool as it can, so as to reduce the amount of REDO recovery to do during the restore sequence.[Edit: btw, a checkpoint doesn't take locks either - see my blog post for details: [url=http://www.sqlskills.com/BLOGS/PAUL/post/How-do-checkpoints-work.aspx]How do checkpoints work and what gets logged[/url]. Whatever differing descriptions you may read elsewhere are unfortunately incorrect - this description is based on the code itself.]Take a look at my backup article I referenced a few posts above which explains exactly what happens.It's worked the same way since 7.0 up to 2008.Thanks</description><pubDate>Tue, 09 Feb 2010 21:41:10 GMT</pubDate><dc:creator>Paul Randal</dc:creator></item><item><title>RE: Transaction Log Backups</title><link>http://www.sqlservercentral.com/Forums/Topic862180-2616-1.aspx</link><description>[quote]That wouldn't be enough to recover the database. If there was a long running transaction that started before the full backup did, only backing up the transaction log generated during the backup would not allow the transaction to be rolled back correctly during the restore operation[/quote]I was under the impression that at the start of a backup, a checkpoint is issued and a marker is placed in the trans log indicating that a database wide lock was obtained (to ensure there are no running transactions), this lock is then released and the backup is performed.  At the end of the backup, another checkpoint is issued (another lock obtained and released) and the section of the transaction log between the two checkpoints is backed up.  Has this changed between 2005 and 2008 or did I dream all that  :-D</description><pubDate>Tue, 09 Feb 2010 21:26:17 GMT</pubDate><dc:creator>Ted Stryker</dc:creator></item><item><title>RE: Transaction Log Backups</title><link>http://www.sqlservercentral.com/Forums/Topic862180-2616-1.aspx</link><description>Excellent question. Then I noticed who the author of it is, and realized... but of course!</description><pubDate>Tue, 09 Feb 2010 09:37:48 GMT</pubDate><dc:creator>WayneS</dc:creator></item><item><title>RE: Transaction Log Backups</title><link>http://www.sqlservercentral.com/Forums/Topic862180-2616-1.aspx</link><description>[quote][b]Lynn Pettis (2/9/2010)[/b][hr]Good question.  Easy if you understand recovery models and backup/restore processes.[/quote]Yeah. What he said. Full means complete, all in one.Nice question.</description><pubDate>Tue, 09 Feb 2010 08:46:00 GMT</pubDate><dc:creator>Tom Garth</dc:creator></item><item><title>RE: Transaction Log Backups</title><link>http://www.sqlservercentral.com/Forums/Topic862180-2616-1.aspx</link><description>@jadsmith But the question wasn't about log backups - it was about full backups. Full backups do not affect log backups, nor do they take them into account. A full backup only has to include the transaction log necessary to recover the database consistently to the time when the data-reading portion of the backup completed. It doesn't matter if the transaction log is GBs and there hasn't been a log backup for weeks - the full backup doesn't backup log it doesn't need.Only a log backup will backup all log generated since the last log backup completes. And only a log backup in the FULL or BULK_LOGGED recovery models will allow the log to clear/truncate.@john.curran.z3g That wouldn't be enough to recover the database. If there was a long running transaction that started before the full backup did, only backing up the transaction log generated during the backup would not allow the transaction to be rolled back correctly during the restore operation. All the transaction log for that transaction, all the way back to the initial LOP_BEGIN_XACT log record must be backed up for recovery to be able to operate correctly.See my article in TechNet Magazine for a more full explanation: [url=http://technet.microsoft.com/en-us/magazine/dd822915.aspx]Understanding SQL Server Backups[/url] and also this blog post which gives you code examples you can use to convince yourself of what's going on under the covers: [url=http://www.sqlskills.com/BLOGS/PAUL/post/Misconceptions-around-the-log-and-log-backups-how-to-convince-yourself.aspx]Misconceptions around the log and log backups: how to convince yourself[/url]Thanks</description><pubDate>Tue, 09 Feb 2010 08:23:16 GMT</pubDate><dc:creator>Paul Randal</dc:creator></item><item><title>RE: Transaction Log Backups</title><link>http://www.sqlservercentral.com/Forums/Topic862180-2616-1.aspx</link><description>Good question.  Easy if you understand recovery models and backup/restore processes.</description><pubDate>Tue, 09 Feb 2010 06:46:11 GMT</pubDate><dc:creator>Lynn Pettis</dc:creator></item><item><title>RE: Transaction Log Backups</title><link>http://www.sqlservercentral.com/Forums/Topic862180-2616-1.aspx</link><description>Great question - got it wrong, but caused me to think.</description><pubDate>Tue, 09 Feb 2010 06:35:29 GMT</pubDate><dc:creator>sjimmo</dc:creator></item><item><title>RE: Transaction Log Backups</title><link>http://www.sqlservercentral.com/Forums/Topic862180-2616-1.aspx</link><description>This page suggests that option 2 is correct:http://msdn.microsoft.com/en-us/library/ms186289.aspxYou can re-create a whole database in one step by restoring the database from a full database backup to any location. Enough of the transaction log is included in the backup to let you recover the database to the time when the backup finished.</description><pubDate>Tue, 09 Feb 2010 06:35:08 GMT</pubDate><dc:creator>john.curran.z3g</dc:creator></item><item><title>RE: Transaction Log Backups</title><link>http://www.sqlservercentral.com/Forums/Topic862180-2616-1.aspx</link><description>Good question</description><pubDate>Tue, 09 Feb 2010 05:28:04 GMT</pubDate><dc:creator>Stewart "Arturius" Campbell</dc:creator></item><item><title>RE: Transaction Log Backups</title><link>http://www.sqlservercentral.com/Forums/Topic862180-2616-1.aspx</link><description>Good question..simple one if basics are clear...</description><pubDate>Tue, 09 Feb 2010 01:13:49 GMT</pubDate><dc:creator>jshailendra</dc:creator></item><item><title>RE: Transaction Log Backups</title><link>http://www.sqlservercentral.com/Forums/Topic862180-2616-1.aspx</link><description>from sql help http://msdn.microsoft.com/en-us/library/ms186865.aspxUnder the full recovery model or bulk-logged recovery model, conventional backups also include sequential transaction log backups (or log backups), which are required. Each log backup covers the portion of the transaction log that was active when the backup was created, and it includes all log records not backed up in a previous log backup. This indecates that the last answer is correct. Also it would need to backup anything not backed up in a previous log backup so that it could restore to a point in time after the last log backup.</description><pubDate>Tue, 09 Feb 2010 00:49:12 GMT</pubDate><dc:creator>jadsmith</dc:creator></item><item><title>RE: Transaction Log Backups</title><link>http://www.sqlservercentral.com/Forums/Topic862180-2616-1.aspx</link><description>Thanks Paul.  Excellent question.</description><pubDate>Tue, 09 Feb 2010 00:47:43 GMT</pubDate><dc:creator>SQLRNNR</dc:creator></item><item><title>RE: Transaction Log Backups</title><link>http://www.sqlservercentral.com/Forums/Topic862180-2616-1.aspx</link><description>sad, i got this one wrong... :(2 options looked very likely ...http://msdn.microsoft.com/en-us/library/aa173551(SQL.80).aspx</description><pubDate>Tue, 09 Feb 2010 00:25:27 GMT</pubDate><dc:creator>ziangij</dc:creator></item><item><title>Transaction Log Backups</title><link>http://www.sqlservercentral.com/Forums/Topic862180-2616-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/questions/Backup+and+Recovery/69471/"&gt;Transaction Log Backups&lt;/A&gt;[/B]</description><pubDate>Mon, 08 Feb 2010 20:51:54 GMT</pubDate><dc:creator>Paul Randal</dc:creator></item></channel></rss>