缩小复制数据库
现在我正在使用带有可更新订阅的事务复制。 有没有什么方法(包括 T-SQL)可以用来缩小复制模式中使用的分发数据库? 该文件名为distribution.MDF
另外我发现repldata文件夹中存储了相当大的数据,是否保存删除该文件? 如何?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
分发数据库只是一个常规系统数据库,所以是的,您可以像管理管理中的所有其他数据库(它位于系统数据库文件夹下)一样缩小它。工作室。
但是,由于该数据库用于存储复制所需的数据,因此当放入更多数据时,它可能会再次增长,因此并不总是建议收缩它。
repldata 应包含用于复制的快照,并且是新订阅和重新初始化先前订阅所需要的。 除非您使用快照发布,否则我相信您删除内容是安全的。 然而,我没有找到任何文档来确认它受支持,因此这样做可能不是一个好主意(但是,由于 SQL Server 2000 及更高版本支持快照的备用位置,其中包括可移动媒体,因此它不应该关心它)
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)