Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Does the full backup clear/truncate the t-log?


Does the full backup clear/truncate the t-log?

Author
Message
JakeSA
JakeSA
Grasshopper
Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)

Group: General Forum Members
Points: 13 Visits: 37
My understanding is only the t-log backup will truncate the log and delete the inactive log entries in the t-log, but I still encounter DBAs who say the full database backup will do so for its t-log. Anyone know for sure?
Ninja's_RGR'us
Ninja's_RGR'us
SSC-Insane
SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)

Group: General Forum Members
Points: 20931 Visits: 9671
You're right.

http://www.sqlservercentral.com/articles/64582/
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47243 Visits: 44377
JakeSA (11/14/2011)
My understanding is only the t-log backup will truncate the log and delete the inactive log entries in the t-log, but I still encounter DBAs who say the full database backup will do so for its t-log. Anyone know for sure?


http://sqlskills.com/BLOGS/PAUL/post/Misconceptions-around-the-log-and-log-backups-how-to-convince-yourself.aspx
http://sqlskills.com/BLOGS/PAUL/post/Debunking-a-couple-of-myths-around-full-database-backups.aspx


p.s. Nothing deletes inactive log records from the log. Ever.


Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
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


JakeSA
JakeSA
Grasshopper
Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)

Group: General Forum Members
Points: 13 Visits: 37


p.s. Nothing deletes inactive log records from the log. Ever.


Hmmm, then how are the spaces freed up in the log file? Or maybe you mean that inactive logs entries are marked as having been backed up in a t-log backup so that they can be overwritten?
Ninja's_RGR'us
Ninja's_RGR'us
SSC-Insane
SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)

Group: General Forum Members
Points: 20931 Visits: 9671
JakeSA (11/14/2011)


p.s. Nothing deletes inactive log records from the log. Ever.


Hmmm, then how are the spaces freed up in the log file? Or maybe you mean that inactive logs entries are marked as having been backed up in a t-log backup so that they can be overwritten?



The log doesn't autoshrink to free the space back to the OS.


The vlf are marked as resusable.
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47243 Visits: 44377
JakeSA (11/14/2011)
[quote]Or maybe you mean that inactive logs entries are marked as having been backed up in a t-log backup so that they can be overwritten?


I mean exactly what I say. :-) Nothing ever removes log records from the log. A log backup marks active VLFs as inactive. Once inactive they can be overwritten.


Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
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


JakeSA
JakeSA
Grasshopper
Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)

Group: General Forum Members
Points: 13 Visits: 37



The log doesn't autoshrink to free the space back to the OS.


The vlf are marked as resusable.


Oh, got you. Which is what I realized. True, the log file does not have an option for auto shrink. That brings up another question. None of the database options (configurable in SSMS or sp_configure or sp_dboption) are applicable to the log file. They are applicable to the data (MDF and NDF) files only. Right?

This is a good discussion!
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47243 Visits: 44377
JakeSA (11/14/2011)
None of the database options (configurable in SSMS or sp_configure or sp_dboption) are applicable to the log file. They are applicable to the data (MDF and NDF) files only.


Database options meaning???????


Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
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


viiki.seth
viiki.seth
Valued Member
Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)Valued Member (63 reputation)

Group: General Forum Members
Points: 63 Visits: 158
sp_configure is used to read/change server wide settings.
sp_dboption is used to modify database level properties (not specific to a particular mdf or ndf).

so when you use sp_dboption to auto shrink a database (which is a bad option), all your database files will be shrunk.
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