Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Srink Log File in SQL 2005

Posted on 2015-01-08
6
Medium Priority
?
107 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 52

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
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
LVL 52

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 70

Accepted Solution

by:
Scott Pletcher earned 2000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Ready to get certified? Check out some courses that help you prepare for third-party exams.
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how the fundamental information of how to create a table.

597 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