You are here: Re: big log file « MsSQL Server « IT news, forums, messages
Re: big log file

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация