March 27, 2013 at 6:17 pm
Does backup of transaction log reduce the log file size or it is DBCC SHRINKFILE really make the size small?
I know it is not good practice to shrink log, but we have special case that need to do that to save space. For example we have some archived databases and set to readonly, and simple recovery mode,
we don't need those big log file there, so I was able to shrink the log size to a smaller one.
But I remember somewhere I read only backup transaction log reduces the size, not shrink , or maybe I didn't remmember it correctly?
Thanks
March 28, 2013 at 3:21 am
Log backups don't change the size of the file, they just mark the space inside as reusable.
Please read through this - Managing Transaction Logs[/url]
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
March 28, 2013 at 4:42 am
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
March 28, 2013 at 6:40 am
If the database is in Full recovery model then you can able to take the log backup.
March 28, 2013 at 10:08 am
Thanks all, so I think I remember it wrong,
What is correct should be:
Backup transaction log is only mark part of transaction log file active, so it could be reused, and it will not make the size small.
Shrink will actually reduce the size of the log file.
March 28, 2013 at 10:18 am
ganasulochana (3/28/2013)
If the database is in Full recovery model then you can able to take the log backup.
for simple recovery mode, when it will do the checkpoints?
March 28, 2013 at 11:07 am
sqlfriends (3/28/2013)
ganasulochana (3/28/2013)
If the database is in Full recovery model then you can able to take the log backup.for simple recovery mode, when it will do the checkpoints?
Checkpoint runs on a regular basis in databases in all recovery models. Recovery model doesn't change how often checkpoint runs, it depends on data changes and the recovery interval setting.
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
March 28, 2013 at 11:09 am
GilaMonster (3/28/2013)
sqlfriends (3/28/2013)
ganasulochana (3/28/2013)
If the database is in Full recovery model then you can able to take the log backup.for simple recovery mode, when it will do the checkpoints?
Checkpoint runs on a regular basis in databases in all recovery models. Recovery model doesn't change how often checkpoint runs, it depends on data changes and the recovery interval setting.
Thanks much, is there a way that I can find out what it the 'recovery interval setting'?
March 28, 2013 at 11:17 am
Sure, look it up on the server properties window, in sys.configurations or sp_configure.
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
March 28, 2013 at 1:23 pm
If you haven't specified it during the initial install, it's set to 0 by default, meaning that it happens automatically (running approximately every 1 minutes for active DB's)
Reference MSDN here
______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience
March 28, 2013 at 1:50 pm
MyDoggieJessie (3/28/2013)
If you haven't specified it during the initial install, it's set to 0 by default, meaning that it happens automatically (running approximately every 1 minutes for active DB's)Reference MSDN here
Thanks, that is what I found, it is 0.
So the checkpoints commits approximately every one minute, that is quite frequent than I think.
March 28, 2013 at 1:54 pm
You said this database is Read Only?
If so, there should be no reason why you can't set it to Simple Recovery Model, then Shrink the Transaction Log file down to almost nothing, and I don't think it should ever grow again.
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply