收缩日志文件

USE [master]
GO
ALTER DATABASE AutoBike SET RECOVERY SIMPLE WITH NO_WAIT
GO
ALTER DATABASE AutoBike SET RECOVERY SIMPLE --简单模式
GO
USE AutoBike
GO
DBCC SHRINKFILE (N'qinhejing_Log' , 11, TRUNCATEONLY)
 
GO

--USE AutoBike
--SELECT file_id, name FROM sys.database_files
--GO

USE [master]
GO
ALTER DATABASE AutoBike SET RECOVERY FULL WITH NO_WAIT
GO
ALTER DATABASE AutoBike SET RECOVERY FULL --还原为完全模式
GO

posted @ 2016-11-15 18:45  wpblog  阅读(101)  评论(0编辑  收藏  举报