USE Database_Name; (Replace the Database_Name with your actual database name)
GO
— Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE Database_Name
SET RECOVERY SIMPLE;
GO
— Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (Database_Name_log, 10000);
GO
— Reset the database recovery model.
ALTER DATABASE Database_Name
SET RECOVERY FULL;
GO