SQL Server tip update

Some time ago I mentioned a quick and dirty way of cleaning out the SQL Server transaction log files on a development machine. This trick works perfectly well but Hugo, a fellow Dutch MVP, pointed out that in most cases it is far easier to just change the recovery model of a database to simple. Once done the transaction log is just bog enough to save the current transaction and this is discarded as soon as it is complete.

chancing the recovery model is easy, right click the database in the SQL Server Management Studio, select Properties, go to the options page and the recovery model is right at the top. Of course you can do it using a command: ALTER DATABASE <<Database Name>> SET RECOVERY SIMPLE

Enjoy.
 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>