Step 1:
The SQL statement for 2005 is: Back up log database name with NO_LOG purpose: Truncate database log
The SQL statement for 2008 is: ALTER DATABASE name set recovery simple purpose: Set data to Easy mode
Step 2: Right-click on the specified database and select "task", "shrink", "file".
Step 3: re-open the tab to the right of the "file type" drop-down menu, select "Log", in the "Shrink action" option below, select "Reorganize page before freeing unused space", "Shrink file to", fill 0, click "OK" button.
Step 4:sql2008 After you shrink the log, you need to restore the simple mode to full mode
SQL statement: ALTER DATABASE data name set recovery full
Refer to the Friends of the park article:
Http://www.cnblogs.com/b3b4/archive/2010/03/25/1694595.html
Http://www.cnblogs.com/TLLi/archive/2012/07/15/2592042.html
MS SQL 2005 and 2008 methods for shrinking logs