SQL2008清除数据库日志脚本

--数据库名称sjjhzx,日志文件名称ksoa_zuizhong_Log'

USE sjjhzx   
GO   
ALTER DATABASE sjjhzx SET RECOVERY SIMPLE WITH NO_WAIT   
GO   
ALTER DATABASE sjjhzx SET RECOVERY SIMPLE      
GO   
USE sjjhzx    
GO   
DBCC SHRINKFILE (N'ksoa_zuizhong_Log' , 11, TRUNCATEONLY)   
GO   
USE sjjhzx
GO
ALTER DATABASE sjjhzx SET RECOVERY FULL WITH NO_WAIT   
GO   
ALTER DATABASE sjjhzx SET RECOVERY FULL     
GO

你可能感兴趣的:(SQL2008清除数据库日志脚本)