[dba-SQLServer] Runaway Log File Questions

Ron Allen chizotz at mchsi.com
Thu Mar 3 19:53:30 CST 2005


Hello Eric,

The backup is running now, and I'll be working on this in the morning.
Thanks for the answers!

Ron


Thursday, March 3, 2005, 11:52:02 AM, you wrote:

EB> Ron,

EB> The basic transaction log "dance" you have to do to maintain
EB> a small log file are the following.

EB> 1. Make sure that the log file setting limits file growth to
EB> a manageable level commensurate with your disk capacity.
EB> 2. Set up a schedule to backup the log file and then shrink
EB> it at certain intervals of the day. For a heavy traffic site you
EB> might want to run the schedule every 30 mins or an hour.
EB> 3. To get maximum performance ensure that the logs are being
EB> written to a separate disk from where the data gets written using
EB> a separate disk controller if at all possible.

EB> Now to get from the 72G you have to a more manageable level you need to do the following:

EB> 1. Create a backup device
EB> 2. Backup the database (data and log files)
EB> 3. Shrink the database and log file - this operation may have to be performed several times
EB> 4. When the log file reaches the limit you want it at, set up steps 1 and 2 above.

EB> Alternatively you can detach the database, delete the log
EB> file and then reattach it. You will of course lose the ability to
EB> restore the data from the log file.

EB> Make a backup first before you do so. :)





More information about the dba-SQLServer mailing list