Monday, October 24, 2011

Transaction logs full in MS SQL 2008

This script should help. Assuming that your database is named test.
--changes the database to simple mode
Alter database test
set recovery simple
go
--makes the transaction log one mb
DBCC shrinkfile (test,1)
go
--changes the database back to full recovery
Alter database test
set recovery full

No comments:

Post a Comment