USE [master]
ALTER DATABASE [Whir_InternalSystem]
SET RECOVERY SIMPLE WITH NO_WAIT
ALTER DATABASE [Whir_InternalSystem]
SET RECOVERY SIMPLE
GO
USE [Whir_InternalSystem]
DECLARE @logname VARCHAR(150)
SELECT @logname = NAME
FROM sys.database_files
WHERE NAME LIKE'%log'
DBCC SHRINKFILE(@logname, 11, TRUNCATEONLY)
GO
USE [master]
ALTER DATABASE [Whir_InternalSystem]
SET RECOVERY FULL WITH NO_WAIT
ALTER DATABASE [Whir_InternalSystem]
SET RECOVERY FULL
GO
使用时将[Whir_InternalSystem] 替换成你的数据库名称即可!