Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Does a full backup truncate the log? Expand / Collapse
Author
Message
Posted Wednesday, September 10, 2008 9:08 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, June 19, 2014 9:38 AM
Points: 92, Visits: 240
Situation: DB is in full recovery model for point in time recovery. Maintenance plan does not include taking any translog backups.
If a full backup is ran (from the maintenance plan), does it truncate the log?
If not, does the log just continue to grow until a truncate and a shrink of the log is issued?

Post #567010
Posted Wednesday, September 10, 2008 9:12 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 2:38 AM
Points: 20,816, Visits: 32,751
No. Neither Full or Differential backups truncate the transaction log. During these backups enough of the log is backed up to provide a consistant backup. Transaction Log backups are the only backups that truncate the transaction log of commited transactions.

If you have the database using the Full Recovery model to allow for point in time recovery, you also need to implement transaction log backups between your full and/or differential backups.




Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #567015
Posted Wednesday, September 10, 2008 9:15 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Wednesday, November 26, 2014 12:59 PM
Points: 2,394, Visits: 18,032
No - a full backup does not truncate the log. The log and database backups are somewhat independant. When you backup the log, it will contain all the log entries from the last log backup regardless of when the last full backup was taken. For example, if you backup your log at 8AM, then do a full backup at 9AM, and 10AM and do another log backup at noon, you can restore to 11AM by using either full backup and the noon log backup (the noon log backup contains all the log entries from 8AM to noon). In order to do a point-in-time recovery, you must be doing log backups as well as full backups. If you only do full backups and truncate/shrink your log, you WILL NOT BE ABLE TO RESTORE TO A POINT IN TIME except for the point in time where your full backup was taken. Doing truncate/shrink on your log file doesn't give you any benefit different from having the DB in Simple mode, you lose all the log information.

Good luck - please post any additional questions you have as it appears your current setup will not allow you to restore as you had hoped.

Chad
Post #567020
Posted Wednesday, September 10, 2008 9:21 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 8:31 AM
Points: 40,456, Visits: 36,912
The log will continue to grow until a truncate is issued, at which point the space within the file will be available for reuse.

You say the DB's in full recovery for point in time recovery, but if you don't have log backups, there's no way that you're going to be able to do a point-in-time recovery. Either switch to simple recovery or schedule log backups.

See - http://sqlinthewild.co.za/index.php/2008/07/23/recovery-model-and-transaction-logs/



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #567025
Posted Wednesday, September 10, 2008 9:24 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, June 19, 2014 9:38 AM
Points: 92, Visits: 240
Thanks for everyone's help.
Post #567031
Posted Monday, June 4, 2012 10:15 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, October 27, 2014 11:07 PM
Points: 3, Visits: 76

Cant you use Backup Log for point in time recovery with your full backup?
Post #1310932
Posted Tuesday, June 5, 2012 3:09 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 8:31 AM
Points: 40,456, Visits: 36,912
Please note: 4 year old thread


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1311005
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse