SQL Server清理数据库日志的脚本-干货

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

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

posted @ 2019-09-04 10:20  滑溜溜的小热浪  阅读(448)  评论(0编辑  收藏  举报