Truncating Log Files and Recovering Space

January 19, 2010

For SQL 2005…

http://www.sqlcleanup.com/2008/sql-2005-truncating-log-files-and-recovering-space/

Here’s an updated technique for SQL 2008…
Use <database Name>
GO

Alter Database <database Name> Set Recovery Simple
GO

Alter Database <database Name> Set Recovery Full
GO

DBCC SHRINKFILE (‘<log file name>’, 1)
GO

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.