sql server 2008r2 清除数据库日志
USE [master]
GO
ALTER DATABASE data SET RECOVERY SIMPLE WITH NO_WAIT
GO
ALTER DATABASE data SET RECOVERY SIMPLE --简单模式
GO
USE data
GO
DBCC SHRINKFILE (N'data_log' , 11, TRUNCATEONLY)
GO
USE [master]
GO
ALTER DATABASE data SET RECOVERY FULL WITH NO_WAIT
GO
ALTER DATABASE data SET RECOVERY FULL --还原为完全模式
GO