Link to home
Start Free TrialLog in
Avatar of kacang
kacang

asked on

SQL REplication - RELPDATA folder

Hi guys,
   I am running replication for about 50 tables from one of my database to 2 other databases. Recently, i found my hard disk being utilised severly. I have tracked the source to the folder above (REPLDATA folder) as this is a folder used for the replication process, how do i clear this folder to generate more space in my hard disk? I am afraid my hard disk might fill up too soon causing my server to crash.

  Hope someone can provide a sound recommendation. Thank you.
Avatar of skeeveswp
skeeveswp

What version of SQL are you running?  What kind of replication are you using?  What is the relationship between your databases (same server, different server, etc.)?

-- Steve
Avatar of kacang

ASKER

Thanx Steve for your response. The info you are seeking is as below:

1. The source database is running on MS SQL 2000. The target databases are 2 MS SQL 2000 and a DB2 ver 7.1
2. The type of replication I am using is transactional replication from MS SQL 2000
3. All databases are residing on different servers.

FYI, currently all replications are woking fine. It is just that the server which is holding the source database is filling up quite fast atht e above said folder. I was thinking if deleting all files and sub-folder off that folder but was adviced against doing it from another friend before I run this problem thru the experts (and this is what I am doing now, lol...).

I hope the info I gave is enuf for you to advice me. Thank you.
Since you are using transactional replication, and I am assuming that your REPLDATA folder contains the distribution database, I am wondering whether you have your snapshot agent set to run automatically.  The issue is that the folder has to be large enough to accommodate the latest snapshot AND all transactions since the latest snapshot.  When you execute a snapshot, there should be a cleanup phase that will remove all transactions from the distribution database that are covered by the snapshot, and that should free up space.  If you are running the snapshot agent on an automatic schedule, then perhaps you need to set it to run more frequently.

At any rate, I would check the timestamp of the latest snapshot to see what is going on in that regard.  It it has not been run for a while, try doing a manual snapshot and see if that shrinks the distribution database size.  If the agent is running properly, then it should not be necessary to keep any but the latest snapshot ... although I would want the others on some kind of backup media.

If your distribution database is in the REPLDATA folder, then the growth is probably either from multiple snapshots or a bloated database.  In either case, you don't want to simply delete all the files ... that would require a good deal of work in re-synchronizing the databases, among other things.

For more information on disk size requirements for transactional replication, check the following article:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/replsql/replplan_271q.asp

-- Steve
Avatar of kacang

ASKER

Steve,
  Just to confirm, the sub-folders in the REPLDATA folder which are in the form of dates other than the latest dates can be deleted. Is that right?.. (i mean after i have backed them up that is)

eg. in the REPLDATA folder i have 2 folders namingly 'ftp' folder and 'unc' folder. say, i have another sub-foder called ReplAtoB, and in this folder i have many more sub-folders named by date-time, 20040805180807, 20040805190005, ... (here i should only keep the latest and delete the rest, right?...)

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of skeeveswp
skeeveswp

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial