My database log files have grown to 260GB and I need to shrink them. I have tried numerous scripts such as:
DBCC SHRINKFILE ('HM_Log', 0)
As well as using the Shrink option in SQL Server Management Studio however the log file doesn't seem to shrink.
Has anyone got any suggestions?
The database is on my production server and actively used, I also have a maintenance plan setup to run all the relevant tasks including a daily transaction log backup and a weekly full backup which appears to be working fine.
I need to shrink it down so I can do a full backup + restore on my local development machine, however at the moment the log files is too large for my local drive.
Typically, truncation occurs automatically under the simple recovery model when database is backed up and under the full recovery model when the transaction log is backed up. However, truncation can be delayed by a number of factors. For more information, see http://msdn.microsoft.com/en-us/library/ms345414.aspx.