sqlserver2008r2日志文件过大

---清空日志:

USE [master]
GO
ALTER DATABASE cits SET RECOVERY SIMPLE WITH NO_WAIT
GO
ALTER DATABASE cits SET RECOVERY SIMPLE   --简单模式
GO
USE cits
GO
    DBCC SHRINKFILE (N'cits_log' , 11, TRUNCATEONLY)
GO
USE [master]
GO
ALTER DATABASE cits SET RECOVERY FULL WITH NO_WAIT
GO
ALTER DATABASE cits SET RECOVERY FULL  --还原为完全模式
GO
 
posted @ 2022-03-13 16:18  鸽子飞扬  阅读(234)  评论(0编辑  收藏  举报