Blog
Welcome to the Trioro Tech Blog.
On this blog we post some of the technical challenges and solutions that we've come across. From time to time we also post comments on new technology that we've come across.

Wednesday, September 10, 2008

Getting Rid of a Large SQL Log File

I comes up about once a year where I've come across a database with a log file that has grown too big and shrinking the database doesn't do anything.

To make sure I have a reference for what to do the next time this happens... Here's what's involved in emptying out a large SQL log file:
  • Go to the options of the database and change the recovery mode to Simple
  • Run a full database backup.
  • Run a database Shrink -> Files
  • Choose the transaction log to shrink
  • Check off the option to reorganize the file and then release the free space
  • Execute the Shrink command
  • Set the database back to Full recovery mode
In this case the database that had the large log file was the subscriber to a replicated database.  Since the publisher was being backed-up there wasn't much need to set the database back to full recovery mode.
Blogged with the Flock Browser

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home