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

Posted by Erland Sommarskog on 10/02/02 11:33

pluton (zielonadupa@poczta.onet.pl) writes:
>> Note also that if the database is in full or bulk-logged recovery mode,
>> you need to backup the transaction log regularly.
>
> The point is, that i'd like to 'commit' all opened transactions
> or 'remove' them, because I know that they are not necessary anymore.

You cannot remove open transactions from the log, by any other means
that killing the connections that owns the transaction. But if you said
that you had been debugging, and then exited during a breakpoint, those
transactions were rolled back when you disconnected.

Once a transaction is not open any more, it can be removed from the log,
which can happen in three ways:

o You backup the transaction log to disk or tape.
o You use BACKUP WITH TRUNCATE_ONLY, which cuts the log, but does not
save it.
o You have the database in simple recovery mode, in which case SQL Server
will auto-truncate it.

Notice that truncating is not the same thing as shrinking the file.

--
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

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