Use the following to truncate a log, the TestDbLog is the logical file name of the log file.
USE TestDb GO ALTER DATABASE TestDb SET RECOVERY SIMPLE WITH NO_WAIT DBCC SHRINKFILE(TestDbLog, 1) ALTER DATABASE TestDb SET RECOVERY FULL WITH NO_WAIT GO
Use the following to truncate a log, the TestDbLog is the logical file name of the log file.
USE TestDb GO ALTER DATABASE TestDb SET RECOVERY SIMPLE WITH NO_WAIT DBCC SHRINKFILE(TestDbLog, 1) ALTER DATABASE TestDb SET RECOVERY FULL WITH NO_WAIT GO