Monday, August 27, 2007

How to truncate log file in SQL Server 2005

Found this nice article on how to truncate or totally eliminate log file in SQL Server 2005. I had to do this, because one of my websites' log file got up 6Gig. The procedure is not recommended by Microsoft for live databases, but I could not afford to have it take up that much space. Something had to be done. :)

Eliminate the log file completely


  1. Detach the database


  2. Rename the log file


  3. Attach the database without the log file by highlighting the log file and click the 'Remove' button


  4. Delete the log file



Source: http://www.codeproject.com/

No comments: