Re: begin and end transaction and transaction log
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Wed, 12 Dec 2007 22:18:27 +0000 (UTC)
Kruton (wmlyerly@xxxxxxxxx) writes:
This is more of an architectural question about SQL Server. Can
someone please explain why when I perform a query such as the one
below that updates a table using begin and end transaction I am unable
to programmatically truncate the transaction log. The only way I have
found to truncate the transaction log is to stop and start the SQL
Server Service. Does this transaction use the tempdb? Is that why I
am unable to truncate the transaction log? Is there a better way to
do this?
Begin trans T1
Update sometable
Set random_row = 'blah'
End trans T1
Why would you truncate the transaction log in the first place?
If you run with full recovery and want to be table to restore to a point
in time, the you should backup your transaction log regularly.
If you don't care about the point-in-time restores but are content with
restoring from a full backup in case of a failure, you should set the
database in simple recovery.
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
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
.
- Follow-Ups:
- Re: begin and end transaction and transaction log
- From: Kruton
- Re: begin and end transaction and transaction log
- References:
- begin and end transaction and transaction log
- From: Kruton
- begin and end transaction and transaction log
- Prev by Date: Re: Find all chars in table that are ASCII code 128 and Greater
- Next by Date: Re: deadlock and high cpu - chicken or the egg
- Previous by thread: begin and end transaction and transaction log
- Next by thread: Re: begin and end transaction and transaction log
- Index(es):
Relevant Pages
|