This piece of T-SQL is deprecated in 2005:
BACKUP LOG [DB_NAME] WITH TRUNCATE_ONLY
I don't need to keep a backup the log for my db - but I do not want the piece of code to stop working if we port to SQL2008 or successive versions in future.
Cheers
Switch the database recovery mode to SIMPLE, and then use DBCC SHRINKFILE. Then restore your original recovery mode. If your LOG file does not shrink, you might have uncommitted transactions. For more details, see Tibor's Karaszi's article on shrinking.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With