I have a SQL Server 2008 database which has a log file (.ldf) with a size of 360GB and growing every day.
The .mdf file is only 25GB. The hard drive is 950 GB and has 150GB free space. I want to shrink this log file so that it doesn't overrun the hard drive on the server.
I used dbcc shrinkfile('my database log file name', 0) but unfortunately, it doesn't shrink the file. Now I know I need to take a log backup and then run the shrink command for the file to shrink.
My problem is that I don't have enough hard drive space to take a log backup.
Is there anyway I can shrink this file?
The database is on FULL RECOVERY MODE with mirroring ON. Please advise. Any tips to avoid this problem in the future would also be appreciated.
DBCC CHECKPOINT– Stoleg Jun 06 '13 at 08:01