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


Why is my transaction log full?


Why is my transaction log full?

Author
Message
rfr.ferrari
rfr.ferrari
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1533 Visits: 13627
Thanks Gail for this great article!!!!


rfr.ferrari
DBA - SQL Server 2008
MCITP | MCTS

remember is live or suffer twice!
the period you fastest growing is the most difficult period of your life!

Adam Seniuk
Adam Seniuk
SSChasing Mays
SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)

Group: General Forum Members
Points: 622 Visits: 1040
Thanks Gail, please keep up the great knowledge transfer.
I agree with others, read what you (and Steve) write and you will be a great DBA.

Well it has helped me quite a bit.


Over 12yrs in IT and 10yrs happily stuck with SQL.

http://aseniuk.wordpress.com
- SQL 2008/R2/2012/2014
- Oracle 8/9/10/11
- MySQL 4/5
Jim P.
Jim P.
SSC Eights!
SSC Eights! (897 reputation)SSC Eights! (897 reputation)SSC Eights! (897 reputation)SSC Eights! (897 reputation)SSC Eights! (897 reputation)SSC Eights! (897 reputation)SSC Eights! (897 reputation)SSC Eights! (897 reputation)

Group: General Forum Members
Points: 897 Visits: 2215
Do you have replication going?

However, there was a bug in some versions of SQL 2005 that could result in a log reuse wait of Replication


This bug was also present in SQL 2008 R2 RTM. They apparently finally fixed it in the R2 SP1.

What will happen is that when replication refreshes itself, it sends down DDL commands to update, add, and change the syncobj% views as well as it's internal SP's. Those replications get hung, and everything behind it as well. It happens on a very inconsistent basis with a high stress on the servers and databases.

The true fix is get to at least the R2 SP1, and if running 2008 or 2005 get to the SP that came out at about the same time.



----------------
Jim P.

A little bit of this and a little byte of that can cause bloatware.
Adam Seniuk
Adam Seniuk
SSChasing Mays
SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)

Group: General Forum Members
Points: 622 Visits: 1040
Jim P. (8/31/2012)
Do you have replication going?

However, there was a bug in some versions of SQL 2005 that could result in a log reuse wait of Replication


This bug was also present in SQL 2008 R2 RTM. They apparently finally fixed it in the R2 SP1.

What will happen is that when replication refreshes itself, it sends down DDL commands to update, add, and change the syncobj% views as well as it's internal SP's. Those replications get hung, and everything behind it as well. It happens on a very inconsistent basis with a high stress on the servers and databases.

The true fix is get to at least the R2 SP1, and if running 2008 or 2005 get to the SP that came out at about the same time.



Hey Jim, do you have a KB article I can look at so I can push to get SP1 installed in all of my environments... we are seeing this happening quite a bit and frankly its getting annoying to reset replication everytime.


Over 12yrs in IT and 10yrs happily stuck with SQL.

http://aseniuk.wordpress.com
- SQL 2008/R2/2012/2014
- Oracle 8/9/10/11
- MySQL 4/5
Jim P.
Jim P.
SSC Eights!
SSC Eights! (897 reputation)SSC Eights! (897 reputation)SSC Eights! (897 reputation)SSC Eights! (897 reputation)SSC Eights! (897 reputation)SSC Eights! (897 reputation)SSC Eights! (897 reputation)SSC Eights! (897 reputation)

Group: General Forum Members
Points: 897 Visits: 2215
The nearest I could find to it is the blog item that was cited in the article.

But if you look at the dates on the blog it was probably in the code base for SQL 2008 at least.

http://blogs.msdn.com/b/sqlserverfaq/archive/2009/06/01/size-of-the-transaction-log-increasing-and-cannot-be-truncated-or-shrinked-due-to-snapshot-replication.aspx

I think this is one where M$ had problems locating it and fixing it, and thought not many users had run into it. So they quietly just patched it.



----------------
Jim P.

A little bit of this and a little byte of that can cause bloatware.
Kenneth.Fisher
Kenneth.Fisher
SSCarpal Tunnel
SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)

Group: General Forum Members
Points: 4268 Visits: 2031
Great article Gail. Very well written and organized.

Kenneth Fisher
I strive to live in a world where a chicken can cross the road without being questioned about its motives.
--------------------------------------------------------------------------------
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Link to my Blog Post --> www.SQLStudies.com
axel.vandencamp
axel.vandencamp
SSC Rookie
SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)

Group: General Forum Members
Points: 25 Visits: 139
damn, a while a go I got this info together searching on various websites

this one definitely goes in my favourites for future reference

thanks for the clear explanation
Axel
Adam Seniuk
Adam Seniuk
SSChasing Mays
SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)SSChasing Mays (622 reputation)

Group: General Forum Members
Points: 622 Visits: 1040
Jim P. (8/31/2012)
The nearest I could find to it is the blog item that was cited in the article.

But if you look at the dates on the blog it was probably in the code base for SQL 2008 at least.

http://blogs.msdn.com/b/sqlserverfaq/archive/2009/06/01/size-of-the-transaction-log-increasing-and-cannot-be-truncated-or-shrinked-due-to-snapshot-replication.aspx

I think this is one where M$ had problems locating it and fixing it, and thought not many users had run into it. So they quietly just patched it.


Thank you very much Jim!
We are now at least looking at patching. BigGrin


Over 12yrs in IT and 10yrs happily stuck with SQL.

http://aseniuk.wordpress.com
- SQL 2008/R2/2012/2014
- Oracle 8/9/10/11
- MySQL 4/5
Scott D. Jacobson
Scott D. Jacobson
SSChasing Mays
SSChasing Mays (618 reputation)SSChasing Mays (618 reputation)SSChasing Mays (618 reputation)SSChasing Mays (618 reputation)SSChasing Mays (618 reputation)SSChasing Mays (618 reputation)SSChasing Mays (618 reputation)SSChasing Mays (618 reputation)

Group: General Forum Members
Points: 618 Visits: 1017
Wow, what great timing to repost this article. A customer of ours ran into this over the weekend. The cause in sys.databases appears to be ACTIVE_BACKUP_OR_RESTORE.

When I look at the maintenance plan history, his backups started taking 20+ hours to run. Beginning on 8/25/2012 we can see very long backup durations. The maintenance plan checks database integrity, deletes old backups, then runs a new backup. On 9/3/2012, the maintenance plan failed on the DBCC CHECKDB step with the following error:

Executing the query "DBCC CHECKDB(N'DPTS') WITH NO_INFOMSGS
" failed with the following error: "The transaction log for database 'DPTS' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases
A database snapshot cannot be created because it failed to start.
The database snapshot for online checks could not be created. Either the reason is given in a previous error or one of the underlying volumes does not support sparse files or alternate streams. Attempting to get exclusive access to run checks offline.
The database could not be exclusively locked to perform the operation.
Check statement aborted. The database could not be checked as a database snapshot could not be created and the database or table could not be locked. See Books Online for details of when this behavior is expected and what workarounds exist. Also see previous errors for more details.
Could not write a checkpoint record in database ID 11 because the log is out of space. Contact the database administrator to truncate the log or allocate more space to the database log files.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.


Not out of space on the physical disk. Recovery model is Simple. Any ideas where I should go next?
Robert Davis
Robert Davis
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2728 Visits: 1623
1. Please start new threads for new questions. Don't piggy back. People are not going to be diligent about reading replies in this thread.

2. What are the settings for the log file? Either the growth settings are too big for it to expand with the remaining disk space or the file is set to a size limit that it has reached.



My blog: SQL Soldier
Twitter: @SQLSoldier
My book: Pro SQL Server 2008 Mirroring
Microsoft Certified Master, SQL Server MVP
Database Engineer at BlueMountain Capital Management
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