Hi everyone!
I have a database sized about 500MB and it used to have about 2-300MB log fi
le. But now the log file is about 4GB and I don't know when it grew up that
big. I don't have any issues now, but is it OK or is there something I can
do to make it smaller? Th
ank you for your time.
GregHi Greg,
Are you backing up the log file? You want to do regular
backups of the log - my first guess would be that you
probably aren't doing those. When you backup the log, it
truncates (which is not the same as physically shrinking)
the log. It just means that parts of the log get marked as
inactive so these parts (virtual log files or VLFs) can be
used to record future transactions. Otherwise, the log just
keeps growing to record the transactions and nothing is
"reused" or overwritten.
Another option is if the transaction log is not part of your
recovery plan, you can set the database to simple recovery
model although this isn't typically used with production
databases.
If you need to get the log down to a more reasonable size,
you can use dbcc shrinkfile. You'd want to shrink it to the
size it needs to be for your database as continual
shrinking, growing of the log consumes resources. You can
find info on shrinking the log in the following article:
INF: Shrinking the Transaction Log in SQL Server 2000 with
DBCC SHRINKFILE
http://support.microsoft.com/?id=272318
-Sue
On Tue, 27 Jul 2004 14:21:04 -0700, "Greg"
<Greg@.discussions.microsoft.com> wrote:
>Hi everyone!
>I have a database sized about 500MB and it used to have about 2-300MB log file. Bu
t now the log file is about 4GB and I don't know when it grew up that big. I don't
have any issues now, but is it OK or is there something I can do to make it smaller?
T
hank you for your time.
>Greg
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment