|
Posted by Erland Sommarskog on 11/30/05 14:04
pluton (zielonadupa@poczta.onet.pl) writes:
> I have a big log file in my database.
> Probably it is result of debugging process
> of my application (break execution before commit).
>
> What should i do with this log ?
> Is it possible just to remove it ?
*NEVER* delete a log file. *NEVER*. Unless you are dropping the entire
database.
If the log file is overly big, you can use DBCC SHRINKFILE to shrink it.
Use the target_size parameter (look it up in Books Online) to shrink it
to a normal size. Don't shrink it to nothing, as it will autogrow, and
autogrow takes performance.
Note also that if the database is in full or bulk-logged recovery mode,
you need to backup the transaction log regularly.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
[Back to original message]
|