Monday, March 26, 2012

Removal of superflous replication data

Hi,
Ive got a server which replicates an awful lot of constantly changing data - the db itself could be around 2gb in size, however with the replication data in it it has ballooned to 6gb. On top of this, there is all the data in the D:\MSSQL\REPLDATA\unc\ directories which seem to represent another log of some description.

Can I delete this data? I cant see what it would be used for and it totals some 25Gb! Obviously I cannot have this lying around on my server.

Does anyone know what it is used for?
thanks
Pete StoreyThe REPLDATA directory contains snapshot data for the replication. Each time you initialize the subscription, replication agent will write data onto this directory. Yes, you can delete them. But I think your replication setup is incorrect because sql delte those data right after the refresh is complete.|||Hi!

This depends on the type of MSSQL server you use. In MSSQL 7 there's unfortunately no standard functionality which cleans up these replication logings (automatically).
I seem to remember though u can find a Stored Procedure example on the Microsoft Website which does just that...removing older loggings from the Replication loging table.

A crude method would be of course to delete certain publications with the Replication-menu option in Enterprise manager and then go to the subscribing sql server with (for example Query analyzer) go into the database which 'receives' the replicated data and use the sp_deletemergeconflictrow or better yet the sp_mergesubscription_cleanup Stored Procedure to clean up some of the database.

I'm sorry I can't be more specific since it's been quite a while since I had to look into this problem.
Good luck anyway!

Vincent JS|||FYI is SQL Server 2000 SP4.
Cant really be bothered to mess around manually with it all - Im not too impressed overall with replication because it seems to have so many problems with it and things that simply should have been sorted but never were.
Hmm anyone else got any ideas how to delete the data from the replication tables?
Thanks joe for the advice will get rid of that data now
cheers
Pete|||I agree with Joe, check your configuration. Replication might be failing when generating these files - which in that case they would not be deleted.|||Originally posted by rnealejr
I agree with Joe, check your configuration. Replication might be failing when generating these files - which in that case they would not be deleted.

The snapshots appear to be generated correctly and I dont get any errors coming through so not sure what might be wrong with the config.
Any possible pointers?
thanks
Pete

No comments:

Post a Comment