健康一贴灵,专注医药行业管理信息化

快速清除MS SQL SERVER 日志

复制代码
USE [master]
GO
ALTER DATABASE  yourdatabase SET RECOVERY SIMPLE WITH NO_WAIT
GO
ALTER DATABASE  yourdatabase SET RECOVERY SIMPLE
GO
USE  yourdatabase
GO
DBCC SHRINKFILE (N'***log' , 11, TRUNCATEONLY) 
GO
USE [master]
GO
ALTER DATABASE  yourdatabase SET RECOVERY FULL WITH NO_WAIT
GO
ALTER DATABASE  yourdatabase SET RECOVERY FULL
GO
复制代码
要先将数据库的模式改为单一模式
EXEC
sp_configure 'show advanced options', 1 RECONFIGURE WITH OVERRIDE EXEC sp_configure 'Ole Automation Procedures', 1 RECONFIGURE WITH OVERRIDE 然后测试,如下

 

posted @   一贴灵  阅读(784)  评论(1编辑  收藏  举报
努力加载评论中...
学以致用,效率第一
点击右上角即可分享
微信分享提示