Solved

Srink Log File in SQL 2005

Posted on 2015-01-08
6
96 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 49

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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 49

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

Independent Software Vendors: 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!

Question has a verified solution.

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

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

749 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