Question

Right now i currently using transactional replication with updatable subscription. Is there any ways (including T-SQL) that can use to shrink down distribution database used within replication schema? The file was named distribution.MDF

Also i found quite large data stored on folder repldata, is it save to delete this files? And how? Or at least some me how to shrink it

Thanks

Was it helpful?

Solution

The distribution database is just a regular system database, so yes, you can shrink it the same way as you do with all the other databases (It is located under the System Databases folder) in for instance the Management Studio.

However, since that database is being used to store the data needed for the replication, it might grow again when more data is put in, so shrinking it might not always be recommended.

repldata should contain the snapshots for the replication and is needed for new subscriptions and re-initialization of previous ones. Unless you're using Snapshot publishing I believe that it is safe for you to remove the content. I have however not found any documentation that confirms that it is supported so it might not be a good idea to do it (however, since SQL Server 2000 and newer supports alternate locations of the snapshots, which include removable media it should not care about it)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top