Out of Control - SQL Transaction Log

Posted on 2013-06-16
Last Modified: 2013-06-18
I have just started with a compny which has let their Transaction Log ballon to a riduculous level  305 GB for a !.5 GB Catalog.

The backups have been in FULL mode not SIMPLE

The Database was participating in a replication environment.

PUSH replication from a Master Distributed Database

1 Publisher , 3 Subscribers.

One of the Other subscribers - has a trans log of 38 GB.... still bloated in my mind but livable.

What would you recommend to get the Transaction Log to a reasonable level.

Could a person do a detach and reaatach with a new log file ignoring the bloated 305 gb log.
Question by:baeriali

Expert Comment

ID: 39252184
LVL 23

Assisted Solution

Racim BOUDJAKDJI earned 250 total points
ID: 39252708
What would you recommend to get the Transaction Log to a reasonable level.
First, backup your transaction logs.  Second, make sure that nothing is creating a bottleneck in transaction distribution.  As long as the transactions are not properly distributed, log will grow.
LVL 23

Accepted Solution

nemws1 earned 250 total points
ID: 39253374
My question would be if you are doing *any* backups?  FULL and LOG backups should be done at a minimum.  If they are, the transaction log should not be getting that big, I would think.  I do hourly LOG backups and nightly FULL (or DIFF) backups and don't have any log bloat.

Others will yell at me here for even mentioning it, but once backed up (and a backup schedule is set up as well - search for "Ola Hallengren" and perhaps install the excellent maintenance script he offers for free), you can shrink the LOG file back down to a reasonable size.  You can do this with SSMS or using TSQL.
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

LVL 60

Expert Comment

ID: 39254421
How many virtual log files are there in the log?  Use DBCC LOGINFO to find out.  If you're looking at several thousand VLFs then that will slow replication down a LOT.
LVL 75

Expert Comment

by:Anthony Perkins
ID: 39254941

When you get a chance can you take a look at this thread:

This is in reference to a blog you wrote some years ago in Tech Republic.

LVL 23

Expert Comment

ID: 39254975
ac - did you post that to the correct thread?
LVL 75

Expert Comment

by:Anthony Perkins
ID: 39254996
ac - did you post that to the correct thread?
Yep.  Sorry for the hijack.  It was directed at chapmandew.

Author Closing Comment

ID: 39257077
All solutions were reasonable.  The only reason I chose the two I did was it seemed specific  to the problem I was faced with.  Would like to say thanks for the info.on reading the contents of the log file.

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question