Written by:R Teachout6/24/2010 2:58 PM
NOTE: THIS THIS SHOULD ONLY BE USED AS A LAST RESORT TO FREE SPACE IN AN EMERGENCY (such as when you have a server drive with 1Mb free, and have to free space to prevent the databases from causing errors)
USE AT YOUR OWN RISK
exec sp_MSforEachDb 'print "[?]"; USE [?];ALTER DATABASE [?] SET RECOVERY SIMPLE WITH NO_WAIT;'exec sp_MSforEachDb 'print "[?]"; USE [?]; DBCC SHRINKFILE ("?_log" , 1);'exec sp_MSforEachDb 'print "[?]"; USE [?];ALTER DATABASE [?] SET RECOVERY FULL WITH NO_WAIT;'
0 comment(s) so far...