Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 size of ldf files not shrinking after backup

Author  Topic 

ferrethouse
Constraint Violating Yak Guru

352 Posts

Posted - 2012-06-06 : 13:49:30
I thought that when in simple mode if you did a backup that it would truncate your transaction logs but mine stay the same size.

Likewise, when in FULL recovery mode I thought they were truncated whenever the Tlogs were backed up (hourly in our case) but again that doesn't seem to be happening for us.

Is there something that I have to make happen after a backup to do this?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-06-06 : 14:00:53
It truncates inside the file, does not shrink the file. You probably don't want it to be shrunk down though, it probably needs the space for large transactions such as index rebuilds.

Same answer for full recovery model.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

ferrethouse
Constraint Violating Yak Guru

352 Posts

Posted - 2012-06-06 : 14:41:55
In this case I am deleting clients from the database which is causing them to bloat massively (to 100 gigs from a "normal" size of 15 gigs). So I need to shrink them down for disk space reasons.

Thanks for the reply - it makes sense now.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2012-06-06 : 15:00:09
You should consider doing your deletes in batch then to avoid this issue. A large transaction like that could mean a lengthy crash recovery if you hit bad luck of the server crashing or similar.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -