Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2001
    Location
    chennai
    Posts
    21

    Unanswered: Transaction Log

    HII
    there is a piece of code in technet for shrinking transaction log.
    check it
    K.Ramakrishnan
    Chennai

  2. #2
    Join Date
    Dec 2001
    Location
    Seattle, WA; USA
    Posts
    9
    The best way to do it is to right a stored procedure that continuously inserts to a temporary table and after each loop does a dbcc shrinkfile. This way it forces the Virtual Log Files into a different order and when it finds free space at the end of the log it will shrink the file.
    I have heard (but not tested) that SQL 2000 has this now built-in to the DBCC Shrinkfile command.

  3. #3
    Join Date
    Dec 2001
    Location
    Toronto, Canada
    Posts
    335
    Hi

    If this is a production database and it is important to be able to recover the database up to the minute DO NOT set "Truncate Log on Checkpoint" to TRUE. Log pages are held in memory and on a checkpoint these pages are written to disk, but if you set truncate to TRUE you lose the ability to DUMP the log for recovery.

    Make sure your "Autoshrink" is true and setup a job to DUMP your log file periodically. We have the Log dumped every hour for recovery purposes, appending the dumps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •