Srink Log File in SQL 2005

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
Stephen Weber - MCSE, CCNATechnical System Analyst / Enterprise AdministratorAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Scott PletcherConnect With a Mentor Senior DBACommented:
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
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
Did you perform a transaction log backup or a full backup?
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
Stephen Weber - MCSE, CCNATechnical System Analyst / Enterprise AdministratorAuthor Commented:
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
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
The log backup should be BEFORE the shrink.
0
 
Lee SavidgeCommented:
Back up database
Backup log
Shrink log if you need to
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.