您的位置:首页 > 数据库

sqlserver 2008收缩数据库日志

2013-07-18 20:45 369 查看
USE 数据库名;

GO

-- Truncate the log by changing the database recovery model to SIMPLE.

ALTER DATABASE 数据库名

SET RECOVERY SIMPLE;

GO

-- Shrink the truncated log file to 1 MB.

DBCC SHRINKFILE (数据库名_Log, 1);

GO

-- Reset the database recovery model.

ALTER DATABASE 数据库名

SET RECOVERY FULL;

GO
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: