Sqlserver 2008清除数据库日志

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

  

上一篇:递归小Demo


下一篇:C++11 并发指南五(std::condition_variable 详解)