1:
2: DUMP TRAN <DatabaseName> WITH TRUNCATE_ONLY
3: GO
4:
5: USE <DatabaseName>
6: DBCC SHRINKFILE (<DatabaseName>_log, 100);
7: GO
8:
This is not work in SQL 2008, as DUMP is discontinued. Otherwise we have to use BACKUP.
To shrink the log file in SQL 2008,
- Back up the database in “SIMPLE” recovery mode.
- then run above line no 6.
Refer this (http://msdn.microsoft.com/en-us/library/ms144262.aspx) for discontinued functionalities in SQL 2008.
1 comment:
Thank you so much. I was able to shrink my log file with your post
Post a Comment