首页 > 数据库技术 > 详细

sql2005,sql2008,sql2012清空日志语句

时间:2015-06-12 17:00:57      阅读:163      评论:0      收藏:0      [点我收藏+]

sql2005清空日志语句

Backup Log DbName WITH no_log
GO
DUMP TRANSACTION DbName WITH no_log
GO
USE DbName
DBCC SHRINKFILE (2)
GO

sql2008,sql2012清空日志语句

ALTER DATABASE DbName SET RECOVERY SIMPLE WITH NO_WAIT
ALTER DATABASE DbName SET RECOVERY SIMPLE 
DBCC SHRINKFILE (NDbName_Log , 11, TRUNCATEONLY)
ALTER DATABASE DbName SET RECOVERY FULL WITH NO_WAIT 
ALTER DATABASE DbName SET RECOVERY FULL 

 

sql2005,sql2008,sql2012清空日志语句

原文:http://www.cnblogs.com/liaohuolin/p/4571877.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!