Solved

SQL Server 2005 log size & replication issue

Posted on 2008-06-11
5
400 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
ID: 21766977
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
ID: 21769382
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
ID: 21776688
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
ID: 21778660
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
ID: 23420414
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
passing parameter in sql procedure 9 68
configure service broker on all databases 2 92
CREATE DATABASE ENCRYPTION KEY 1 79
How come this XML node is not read? 3 25
If you having speed problem in loading SQL Server Management Studio, try to uncheck these options in your internet browser (IE -> Internet Options / Advanced / Security):    . Check for publisher's certificate revocation    . Check for server ce…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

685 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