?
Solved

SQL Server 2005 log size & replication issue

Posted on 2008-06-11
5
Medium Priority
?
413 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

650 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