压缩sqlserver数据日志文件-钦州市海燕信息科技有限公司
首页 服务 产品 文档 关于

压缩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