Sunday, May 30, 2010

quick and dirty shrinklogs for all databases

This is a real quick and dirty way to shink all the database logs in all the databases please makesure you want to shrink the master, msdb,tempdb and so on before running this.

EXEC SP_MSFOREACHDB 'dbcc shrinkfile(2,1)'

No comments:

Post a Comment