Sunday, September 13, 2009

Shrink database log file in 2008

I have posted a command that should be used to truncate database logs previously But that is not valid for SQL 2008 databases as truncate only command has been deprecated. I have added the command tat should be used to truncate transaction log in SQL 2008 below.

Use Test
Alter Database Test Set Recovery Simple
DBCC SHRNIKFILE (Test_log)
Alter Database Test Set Recovery Full

I was helped by the following post.
http://www.uhleeka.com/blog/2009/08/sql-2008-shrink-log-file-size-with-no_lo/

No comments: