So Tired !_! 逆水行舟, 不进则退!

29Nov/12

sql 2008 清除日志脚本

Posted by Nick Xu

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use master
go
 
ALTER DATABASE [edupress.news] SET RECOVERY SIMPLE WITH NO_WAIT
 
use [edupress.news]
go
select name from sys.database_files
where type_desc = 'log'
 
DBCC SHRINKFILE([shedunews_log], 1)
 
USE [master]
GO
ALTER DATABASE [edupress.news] SET RECOVERY FULL WITH NO_WAIT
Tagged as: , , , No Comments
   
site
site