dbcc sqlperf(logspace) --查看日志大小
USE[master]
GO
ALTER DATABASE [punchWebDB] SET RECOVERY SIMPLE WITH NO_WAIT
GO
ALTER DATABASE [punchWebDB] SET RECOVERY SIMPLE --简单模式
GO
USE [punchWebDB]
GO
DBCC SHRINKFILE (N'renshi100PrivateCloud_Log' ,11, TRUNCATEONLY) --设置压缩后的日志大小为11M,可以自行指定
GO
USE[master]
GO
ALTER DATABASE [punchWebDB] SET RECOVERY FULL WITH NO_WAIT
GO
ALTER DATABASE [punchWebDB] SET RECOVERY FULL --还原为完全模式