テスト用のデータベースTransaction Logが大きすぎてスクリプトを削減
2027 ワード
ここにメモしておいてください.
参考資料
===============
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
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