ALTER DATABASE DBNAME
SET RECOVERY SIMPLE --设置为简单恢复模式
GO
DBCC SHRINKFILE (DBNAME_log, 1)
GO
ALTER DATABASE DBNAME
SET RECOVERY FULL --设置为原模式
GO
ALTER DATABASE DBNAME
SET RECOVERY SIMPLE --设置为简单恢复模式
GO
DBCC SHRINKFILE (DBNAME_log, 1)
GO
ALTER DATABASE DBNAME
SET RECOVERY FULL --设置为原模式
GO