SQL Server 2005 Shrinking Replication Database
I am currently using subscription updatable transactional replication. Are there any methods (including T-SQL) that can be used to shrink the distribution database used in the replication scheme? The file was named distribution.MDF
Also I found quite large data stored in the repldata folder, does that save files to delete these files? And How? Or at least some of me how to squeeze it
thanks
source to share
The distribution database is just a regular system database, so yes, you can shrink it in the same way as with all other databases (it's in the System Databases folder) for the Studio Management instance.
However, since this database is used to store the data required for replication, it can grow back when more data is added, so shrinking it may not always be recommended.
repldata strong> must contain snapshots for replication and is required for new subscriptions and reinitialization of previous ones. If you are not using snapshot posting, I believe you can remove the content. However, I haven't found any documentation to support it, so it would be a good idea to do so (however, since SQL Server 2000 and newer support alternate snapshot locations that include removable media, which shouldn't bother)
source to share