troubleshooting Question

LDF Log file is 30.6 GB - Initial Size somehow set to 30 GB and it can't be changed

Avatar of djlurch
djlurch asked on
Microsoft SQL Server 2005
6 Comments2 Solutions3002 ViewsLast Modified:
When one of my sql databases was set up, the default initial size got set to 30GB (!). I have tried shrinking the log file, but it won't shrink to below about 30GB. I have tried changing the default initial size to 50MB, but it reverts back to 30 GB when I take any actions. I have tried backing up the database and restoring it from the backup...and it re-incorporates the 30GB file.

I have tried the following SQL query but it gives the following error. Note that I tried limiting it to a single user.


USE [dbname]

SELECT @FILEID = file_id FROM sys.database_files WHERE type = 1



Cannot shrink log file 2 (dbname_log) because all logical log files are in use.

(1 row(s) affected)
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

I'm stuck. I've had one SQL vendor try to help, but he's stuck. Help!

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros