sqlserver 清理日志
USE <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_log_name>);
-- Reset the database recovery model.
ALTER DATABASE <database_name>
SET RECOVERY FULL;
GO