-- Truncate the log by changing the database recovery model to SIMPLE.ALTERDATABASE dbname
SET RECOVERY SIMPLE;
-- Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (2, 1); -- here 2 is the file ID for trasaction log file,you can also mention the log file name (dbname_log)
-- Reset the database recovery model.ALTERDATABASE dbname
SET RECOVERY FULL;