首頁 服務 產品 文檔 關于

壓縮sqlserver數據日志文件

USE [master]
GO
ALTER DATABASE dbname SET RECOVERY SIMPLE WITH NO_WAIT
GO
ALTER DATABASE dbname SET RECOVERY SIMPLE
GO
USE dbname
GO
DBCC SHRINKFILE (N'dbname_Log' , 11, TRUNCATEONLY)
GO
USE [master]
GO
ALTER DATABASE dbname SET RECOVERY FULL WITH NO_WAIT
GO
ALTER DATABASE dbname SET RECOVERY FULL
GO
人人操人人爽