Friday, August 26, 2011

T-SQL: Clear transaction logs for all databases

Works only for SQL2005

EXEC sp_MSforeachdb @command1 = "BACKUP LOG ? WITH TRUNCATE_ONLY DBCC SHRINKDATABASE( ? ) "


1 comment:

  1. Clearing out data can be done through this method. It depends on how you configure the tool.

    SEO Philippines

    ReplyDelete