Solved

SQL Server 2005 log size & replication issue

Posted on 2008-06-11
5
392 Views
Last Modified: 2011-10-03
Hi Guys

I have a problem that occur times to times.  My transaction log are full and taking all disk space.  The workaround we find is :
stop transaction log reader agent
run EXEC sp_repldone ...
shink log
restart transaction log reader agent
reinitialize replication

But this take some hours,

My question is What cause this appen and how to prevent is to occur in the future?

If I define 10 transaction log of 10Go each, is I'll be able to shrink some of them while other are locked?

Thanks
0
Comment
Question by:DanielBlais
  • 3
  • 2
5 Comments
 
LVL 2

Expert Comment

by:knowledge_riot
Comment Utility
Are you taking regular backups of your transaction logs? Backing up a transaction log automatically truncates the inactive transactions.

See: http://support.microsoft.com/kb/873235
You can set up a transaction log backup in Management Studio.

In our databases, the transaction logs are backed up every 15 minutes and stored in a separate directory to allow us to recover the database, should it ever be required,
0
 
LVL 2

Author Comment

by:DanielBlais
Comment Utility
In this situation it doesn't work.  Putting the database in simple recovery model and truncating log file doesn't work either.  The only way we find it works is to stop the log reader agent and run EXEC sp_repldone...
0
 
LVL 2

Expert Comment

by:knowledge_riot
Comment Utility
I have never used sp_repldone
From http://msdn.microsoft.com/en-us/library/ms173775.aspx  ....
"If you execute sp_repldone manually, you can invalidate the order and consistency of delivered transactions. sp_repldone should only be used for troubleshooting replication as directed by an experienced replication support professional."

Did you once have the database set up for replication? Do you need to have it set up for replication? Have you tried taking a full backup of the database and recreating it to see if that resolves the problem?
0
 
LVL 2

Author Comment

by:DanielBlais
Comment Utility
I know this invalidate the replication.  After we use that we reinitialize all replication.

The database have replication since 3 years but the problem began since 4 or 5 month.  It doesn't occur frequently but cause downtime.

What we know, when this occur, the log file can growth from 1go to 80go in a half of hour!, even if the database is in simple recovery model.  Full backup + log backup and/or and dbcc shrinkfile has no effect (on the log size).

We are not sure but it seem to appear the there a very high number of small transaction on a small period.
0
 
LVL 2

Accepted Solution

by:
DanielBlais earned 0 total points
Comment Utility
The solution to my problem was, in the Log Reader Agent, to

increase the PacketSize, pollingInterval and ReadBatchSize parameters.

Here my entire log reader agent command :

-Publisher [GWS-SQL-1] -PublisherDB [wws] -Distributor [gws-sql-1] -DistributorSecurityMode 1  -Continuous -PacketSize 16384 -pollingInterval 10 -ReadBatchSize 2000
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now