Friday, 6 November 2009

No TRUNCATE_ONLY?

So, it looks like Microsoft removed the very useful 'truncate_only' option from the backup command. Citing that you should switch to simple recovery mode instead. I dont like that. However, instead you have two alternatives, outside of the simple recovery nonsese.

1. Use a NULL device are the destination for your backup command.
2. If you have Quest's Litespeed installed, use the --nowrite option.

NULL Device
backup log northwind to disk = 'nul:'

LiteSpeed
exec xp_cmdshell 'sqllitespeed.exe -B LOG -D northwind -F c:\null.bak --nowrite'