测试用的数据库Transaction Log太大, 用于缩减它的脚本

记在这里, 备用.

select name, recovery_model_desc
from sys.databases
where name = ‘WSS_Content_1000‘

USE WSS_Content_1000 ;
ALTER DATABASE WSS_Content_1000 SET RECOVERY Simple;
go

use WSS_Content_1000
go
checkpoint
go
checkpoint
go
dbcc shrinkfile(WSS_Content_1000_Log, 200);
go

USE WSS_Content_1000 ;
ALTER DATABASE WSS_Content_1000 SET RECOVERY FULL;
go

 

参考资料

===============

View or Change the Recovery Model of a Database (SQL Server)

http://msdn.microsoft.com/en-us/library/ms189272.aspx

How do you clear the SQL Server transaction log?

http://stackoverflow.com/questions/56628/how-do-you-clear-the-sql-server-transaction-log

测试用的数据库Transaction Log太大, 用于缩减它的脚本,古老的榕树,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。