SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Post Transaction Log Full


Post Transaction Log Full

Author
Message
Like2SQL
Like2SQL
Old Hand
Old Hand (362 reputation)Old Hand (362 reputation)Old Hand (362 reputation)Old Hand (362 reputation)Old Hand (362 reputation)Old Hand (362 reputation)Old Hand (362 reputation)Old Hand (362 reputation)

Group: General Forum Members
Points: 362 Visits: 223
I had a development database set to 'simple' recovery model which ran into a full transaction log error while executing a 'delete' query. I was able to resolve the issue by increasing the size of the X-action log, running a manual checkpoint. I then re-ran the query and it completed successfully.

My question is about the last step - I re-ran the query. I did that because I understood that when the transaction log became full, not all the rows I intended to delete were actually deleted, and had to re-run to actually complete the deletion. Is this correct, or was this unnecessary ?
SQLRNNR
SQLRNNR
SSC Guru
SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)

Group: General Forum Members
Points: 66065 Visits: 18570
Your transaction would have been rolled back. Re-issuing the command would have been the right thing to do.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

Like2SQL
Like2SQL
Old Hand
Old Hand (362 reputation)Old Hand (362 reputation)Old Hand (362 reputation)Old Hand (362 reputation)Old Hand (362 reputation)Old Hand (362 reputation)Old Hand (362 reputation)Old Hand (362 reputation)

Group: General Forum Members
Points: 362 Visits: 223
SQLRNNR (5/5/2013)
Your transaction would have been rolled back.


Even though I ran the checkpoint? Would you mind elaborating? Thanks a lot!
SQLRNNR
SQLRNNR
SSC Guru
SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)

Group: General Forum Members
Points: 66065 Visits: 18570
Running the checkpoint has nothing to do with the transaction rollback caused by the error you encountered. Rollback would have been automatic



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

GilaMonster
GilaMonster
SSC Guru
SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)SSC Guru (222K reputation)

Group: General Forum Members
Points: 222121 Visits: 46285
A transaction is an atomic operation, it completes entirely or not at all. A single-statement delete is a single transaction, no matter how many rows are deleted and as such must succeed or fail as a single operation. If the delete ran out of log space and failed, the entire delete would have to have rolled back.

A manual checkpoint was probably not required, wouldn't have allowed the log to be reused with an active transaction in it. What most likely happened is that the log autogrow didn't happen fast enough and the delete failed and rolled back. Next automatic checkpoint the log was cleared and when you re-ran the delete there was enough space because the log had grown.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Like2SQL
Like2SQL
Old Hand
Old Hand (362 reputation)Old Hand (362 reputation)Old Hand (362 reputation)Old Hand (362 reputation)Old Hand (362 reputation)Old Hand (362 reputation)Old Hand (362 reputation)Old Hand (362 reputation)

Group: General Forum Members
Points: 362 Visits: 223
Thanks for the explanation guys. Much appreciated.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search