Solved

Srink Log File in SQL 2005

Posted on 2015-01-08
6
97 Views
Last Modified: 2015-01-14
One of our log file grew to 200 gigs due to a failed backup, I backed up this file and reduced the file size using the task menu in SQL Server Manager using the options in the attached image,  the action successfully completed, but when I check the size, the log file has not been reduced in size
SQL2005SrinkFile.jpg
0
Comment
[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
6 Comments
 
LVL 50

Expert Comment

by:Vitor Montalvão
ID: 40537890
Did you perform a transaction log backup or a full backup?
0
 
LVL 25

Expert Comment

by:Lee Savidge
ID: 40537936
0
 

Author Comment

by:Stephen Weber - MCSE, CCNA
ID: 40538017
I performed a log backup and then full backup the night before, and a log backup after shrinking the file, but have not done a full backup since attempting the shrink.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 50

Expert Comment

by:Vitor Montalvão
ID: 40538085
The log backup should be BEFORE the shrink.
0
 
LVL 25

Expert Comment

by:Lee Savidge
ID: 40538092
Back up database
Backup log
Shrink log if you need to
0
 
LVL 69

Accepted Solution

by:
Scott Pletcher earned 500 total points
ID: 40538267
Database backups and log backups are independent of each other.  Thus, a missed database backup should not directly affect the log backup size, assuming log backups are running normally.

You need to see if anything is preventing SQL from marking existing log space for reuse, aka "truncating the log":

SELECT name, log_reuse_wait_desc
FROM sys.databases
WHERE name = '<your_db_name>'

If the wait_desc is not "NOTHING", then we need to resolve that first.  If SQL can't "truncate" the log, you won't be able to shrink it.

Btw, I'd strongly urge you to use the command:
DBCC SHRINKFILE
to shrink files rather than the GUI.  The GUI is still on occasion flaky, and that is not an area where you want any flakiness at all.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
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.

726 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