|
Posted by Erland Sommarskog on 10/22/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]
|