SQL Server 压缩日志

ALTER DATABASE DataBaseName SET RECOVERY SIMPLE WITH NO_WAIT
 
ALTER DATABASE DataBaseName SET RECOVERY SIMPLE   --简单模式

DBCC SHRINKFILE (N'DataBaseName_log' , 11, TRUNCATEONLY)   -- 11是大小  11M

ALTER DATABASE DataBaseName SET RECOVERY FULL WITH NO_WAIT

ALTER DATABASE DataBaseName SET RECOVERY FULL  --还原为完全模式