SQL2005 Empty Delete log:
Backup Log with no_log ' The dnname here is the name of the database you want to shrink, and notice that you modify the database name below and I'm not commenting anymore. Godump transaction dnname with no_log gouse dnnamedbcc shrinkfile (2) Go
SQL2008 Empty Delete log:
Use [Master]GOALTER DATABASEDnnameSETRECOVERY Simple withno_waitGOALTER DATABASEDnnameSETRECOVERY Simple--Simple ModeGO UseDnnameGODBCCShrinkfile (N'Dnname_log', One, Truncateonly)GO 'Here's Dnname_log if you don't know what the name is in sys.database_files, you can query it with the following annotated statement' UseDnname'GO'SELECT file_id, Namefrom sys.database_files;'gouse [master]goalter database Dnname set RECOVERY full with No_waitgoalter database Dnname SET RECOVERY Total--Revert to complete mode -Style Go
SQL Server 2008 emptying the delete log file