Shrink the Unshrinkable SQL Transaction Log
The SQL Server GUI for shrinking the database rendered no effect, and even using the DBCC SHRINKFILE command was not working.
The key, as explained by Pinal Dave, is to run the SHRINKFILE command twice,with an explicit backup log truncation in between both runs. This code here will get you up and running:
DBCC SHRINKFILE("DemoData_Log", 1)
BACKUP LOG DemoData WITH TRUNCATE_ONLY
DBCC SHRINKFILE("DemoData_Log", 1)
No comments:
Post a Comment