Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««45678»»

Why is my transaction log full? Expand / Collapse
Author
Message
Posted Friday, August 31, 2012 8:08 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 11:04 AM
Points: 1,254, Visits: 13,552
Thanks Gail for this great article!!!!


rfr.ferrari
DBA - SQL Server 2008
MCITP | MCTS

remember is live or suffer twice!
Post #1352830
Posted Friday, August 31, 2012 10:15 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Monday, July 21, 2014 8:06 AM
Points: 533, Visits: 857
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 11yrs in IT and 9yrs happily stuck with SQL.

http://aseniuk.wordpress.com
- SQL 2008/R2/2012
- Oracle 8/9/10
- MySQL 4/5
Post #1352958
Posted Friday, August 31, 2012 10:57 AM


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Today @ 9:25 AM
Points: 616, Visits: 2,064
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.
Post #1352981
Posted Friday, August 31, 2012 11:46 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Monday, July 21, 2014 8:06 AM
Points: 533, Visits: 857
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 11yrs in IT and 9yrs happily stuck with SQL.

http://aseniuk.wordpress.com
- SQL 2008/R2/2012
- Oracle 8/9/10
- MySQL 4/5
Post #1353022
Posted Friday, August 31, 2012 1:37 PM


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Today @ 9:25 AM
Points: 616, Visits: 2,064
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.
Post #1353072
Posted Sunday, September 2, 2012 11:08 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Friday, July 25, 2014 11:01 AM
Points: 3,461, Visits: 1,785
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
Post #1353250
Posted Tuesday, September 4, 2012 1:02 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, June 27, 2014 3:03 AM
Points: 23, Visits: 136
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
Post #1353730
Posted Tuesday, September 4, 2012 7:34 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Monday, July 21, 2014 8:06 AM
Points: 533, Visits: 857
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. :D



Over 11yrs in IT and 9yrs happily stuck with SQL.

http://aseniuk.wordpress.com
- SQL 2008/R2/2012
- Oracle 8/9/10
- MySQL 4/5
Post #1353884
Posted Tuesday, September 4, 2012 8:18 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Today @ 10:56 AM
Points: 358, Visits: 902
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?
Post #1353921
Posted Tuesday, September 4, 2012 8:46 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Friday, July 25, 2014 10:16 AM
Points: 1,612, Visits: 1,537
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 2008
Principal DBA: Outerwall, Inc.
Also available for consulting: SQL DBA Master
Post #1353952
« Prev Topic | Next Topic »

Add to briefcase «««45678»»

Permissions Expand / Collapse