×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Transaction Log Shrinking

Transaction Log Shrinking

Transaction Log Shrinking

(OP)
I am having trouble shrinking the size of my transaction log.  I just started working here and notice the transaction log was never backed up.  Therefore it grew to 900 meg.  I cannot get the size to decrease and have about 800 Meg allocated that is not being used.  I have truncated the log and performed backups, but I still cannot get the database allocated transaction log file to shrink in physical size.... Any ideas would be appreciated.
Thanks,

RE: Transaction Log Shrinking

Click 'Truncate Log On Checkpoint' if you log is an issue - the only problem is that your log becomes useless to restore from...

Cal


RE: Transaction Log Shrinking

This drove me crazy (a short trip) before finding the "solution" on a newsgroup.  Run this from the Query Analyzer:

dbcc loginfo

If there is a "2" in the status column for the last record, it means that the last portion of the log is the active portion.  There is nothing you can easily do at this point to shrink it.  You can:

A) occasionally (daily, say) run dbcc shrinkfile (your_log) and/or the E/M's Truncate Log option, and wait for the active portion of the log to wrap back around during normal database activity, at which time the file will shrink, OR

B) write a loop in VB, FoxPro, or whatever to force a gazillion writes, thus speeding up the process in A.

Since its not an emergency, I'd choose A.

Robert Bradley

FoxDev - Visual FoxPro Development

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close