|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Tuesday, May 07, 2013 8:12 AM
Points: 275,
Visits: 679
|
|
| Will shrinking the transaction log reduce the size of a full backup?
|
|
|
|
|
SSCoach
         
Group: General Forum Members
Last Login: Monday, May 06, 2013 1:09 PM
Points: 15,439,
Visits: 9,569
|
|
Depends on what you mean by "shrinking". If you mean truncating it, to "shrink" the data in it, then yes. If you mean shrinking the file but leaving the data alone (just getting rid of some free space in it), then no.
Keep in mind that truncating the transaction log is almost always a really, really bad idea.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Tuesday, May 07, 2013 8:12 AM
Points: 275,
Visits: 679
|
|
OK that's what I thought. The T-log grew due to a bad query so now it's >1% used. I was hoping I could shrink to reduce the backup size. Oh well, I'll have to get the vendor to archive some data.
Thanks!
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Yesterday @ 6:33 PM
Points: 32,889,
Visits: 26,757
|
|
Jon.Morisi (10/10/2012) OK that's what I thought. The T-log grew due to a bad query so now it's >1% used. I was hoping I could shrink to reduce the backup size. Oh well, I'll have to get the vendor to archive some data.
Thanks!
When's the last time you did a full rebuild of all indexes?
--Jeff Moden "RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".
First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."
For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Tuesday, May 07, 2013 8:12 AM
Points: 275,
Visits: 679
|
|
| They're done weekly. I'm actually working through testing ola's scripts on it.
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 2:48 AM
Points: 37,635,
Visits: 29,886
|
|
No, neither shrinking the log nor explicitly truncating it will reduce database backup size. The portion of the log included in a full backup is usually just from the start of the oldest open transaction at the point the full backup starts until the end of the backup (can be more if there's replication, CDC or async mirroring)
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
|
|
|
|