My transaction log file (.LDF) has reached 53GB on
a (now full) 80GB hard drive.
Is it safe to delete the log file after a check point
is reached (upon DB shut down, for instance?) And why
does the log file not automatically shrink after check-
points?
Thanks,
Andrew> Is it safe to delete the log file after a check point
> is reached
You can not delete the log file, you can run a backup log dbname with
truncate_only if you do not require point in time recovery, of course, if
you don't require point in time recovery you should set the recovery mode of
the database to simple.
>>And why
> does the log file not automatically shrink after check-
> points?
There are two answers here, one, the data stays in the log even after
checkpoint so you can back it up and have the ability to transactionally
recover. Shrinking is another subject, you can not shrink the actual log
file footprint until it is empty, done by either backing up or truncating
it. Also, if you are doing regular backups of the log and your log file is
growing, it doesn't make sense to keep shrinking it only for it to cause you
a performance hit when it auto-grows again.
HTH
--
Ray Higdon MCSE, MCDBA, CCNA
--
"Andrew" <anonymous@.discussions.microsoft.com> wrote in message
news:0a5201c3c57f$8bfb3340$a301280a@.phx.gbl...
> My transaction log file (.LDF) has reached 53GB on
> a (now full) 80GB hard drive.
> Is it safe to delete the log file after a check point
> is reached (upon DB shut down, for instance?) And why
> does the log file not automatically shrink after check-
> points?
> Thanks,
> Andrew
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment