Executing the code below in SQL Server 2008 will throw an error message:
BACKUP LOG ‘MyDatabase’ WITH TRUNCATE_ONLY Msg 155, Level 15, State 1, Line 44 'TRUNCATE_ONLY' is not a recognized BACKUP option.
It was deprecated in SQL Server 2008.
Some options for SQL Server 2008 are :
1) BACKUP LOG [DBNAME] TO DISK='NUL'
This will break the transaction log chain. Therefore a Full backup is required after the command.
2) Switch to Simple Recovery and then switch back to Full Recovery. This will required a Full backup to restart a new transaction log chain
3) DBCC SHRINKFILE(Test_Log) . This option causes fragmentation , but does the job when it comes to reclaiming space. You might find it doesn’t shrink – in that case check for open transactions.
4) Take regular Transaction Log backups while maintaining a small log file size
The choice will depend on the circumstances.
Author: Jack Vamvas (http://www.sqlserver-dba.com)