收缩数据库日志

--收缩日志
USE DBNAME;
GO
-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE DBNAME
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (DBNAME_Log, 1);
GO
-- Reset the database recovery model.
ALTER DATABASE DBNAME
SET RECOVERY FULL;
GO

  

posted @ 2014-04-09 13:38  山村果园  阅读(114)  评论(0编辑  收藏  举报