MSSQL2008数据库压缩

USE [master]
GO
ALTER DATABASE DNName SET RECOVERY SIMPLE WITH NO_WAIT
GO
ALTER DATABASE DNName SET RECOVERY SIMPLE   --简单模式
GO
USE DNName 
GO
DBCC SHRINKFILE (N'DNName_Log' , 11, TRUNCATEONLY)
GO
USE [master]
GO
ALTER DATABASE DNName SET RECOVERY FULL WITH NO_WAIT
GO
ALTER DATABASE DNName SET RECOVERY FULL  --还原为完全模式
GO

你可能感兴趣的:(MSSQL2008数据库压缩)