USE Databasename;
GO
-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE dblt
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (Databasename_LOG, 1);---Databasename_log log file name
GO
-- Reset the database recovery model.
ALTER DATABASE Databasename
SET RECOVERY FULL;
GO
sp_helpdb Databasename
goThis code snippet for Clear SQL Server Log Details.
