sql server 壓縮日誌文件

USE [master]
GO
ALTER DATABASE TestDB SET RECOVERY SIMPLE WITH NO_WAIT
GO
ALTER DATABASE TestDB SET RECOVERY SIMPLE --簡單模式
GO
--select * from sys.database_files
USE [TestDB]
GO
DBCC SHRINKFILE (N'TestDB_log' , 1, TRUNCATEONLY) 
GO

USE [master]
GO
ALTER DATABASE TestDB SET RECOVERY FULL WITH NO_WAIT
GO
ALTER DATABASE TestDB SET RECOVERY FULL --還原爲徹底模式
GO
相關文章
相關標籤/搜索