Solved

Transaction Log Fails to Shrink

Posted on 2009-04-13
2
516 Views
Last Modified: 2013-11-10
My buddy created a Shrink Transaction Log task for a Tran Log that grows to roughy 1.5 GB every night.  (A sizable job that must be logged runs every evening accounts for this increase.)  He'd like to reduce the log after the job runs, but his Shrink Database Task fails to shrink the log file at all.  The Maintenance Job Log file shows that the job runs successfully, but with no results.  What may be preventing the Tran Log from shrinking?
0
Comment
Question by:jdana
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 22

Accepted Solution

by:
dportas earned 250 total points
ID: 24130967
Log will only remove unused space from the log.

Shrinking should never be scheduled to run on a regular basis. It should be run in exceptional circumstances only. Continual shrinking and growing is a huge waste of resources, causes unwanted fragmentation and in practice it saves you no disk space at all. Don't schedule the shrink task. Set the log to the size it needs to be and then leave it alone.
0
 

Author Closing Comment

by:jdana
ID: 31569563
Sounds reasonable.  Thanks for the advice.
0

Featured Post

 Database Backup and Recovery Best Practices

Join Percona’s, Architect, Manjot Singh as he presents Database Backup and Recovery Best Practices (with a Focus on MySQL) on Thursday, July 27, 2017 at 11:00 am PDT / 2:00 pm EDT (UTC-7). In the case of a failure, do you know how long it will take to restore your database?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question