症状
使用 Microsoft SQL Server 2012 或 2014 Master Data Services (MDS)时,历史记录可能会变得非常大,并且没有可用于清理的内置函数。 添加三个存储过程以清理暂存、验证和事务历史记录。 用法如下所示:
--@ModelID is the model ID that you clean up the log for.--@CLeanupOlderThanDate is the date before that the logs or records is deleted. DECLARE @CleanupOlderThanDate date = '<Date>', @ModelID INT = <ID>--Cleanup Transaction HistoryEXEC mdm.udpTransactionsCleanup @ModelID, @CleanupOlderThanDate; --Cleanup Validation HistoryEXEC mdm.udpValidationsCleanup @ModelID, @CleanupOlderThanDate; --Cleanup entity-based staging tableEXEC mdm.udpEntityStagingBatchTableCleanup @ModelID, @CleanupOlderThanDate;
注意 增长较大的中心表为 tblTransaction、tblTransactionAnnotation、tblValidationLog、、、tblValidationHistory 和。
解决方案
在 SQL Server 的以下累积更新中,此问题首先已修复。
SQL Server 2014 SP1 的累积更新1 /en-us/help/3067839
SQL Server 2012 SP2 的累积更新6 /en-us/help/3052468
SQL Server 2014 累积更新7 /en-us/help/3046038
SQL Server 2012 SP1 的累积更新15 /en-us/help/3038001
SQL Server 的每个新的累积更新均包含以前的累积更新中包含的所有修补程序和所有安全修补程序。 查看 SQL Server 的最新累积更新:
状态
Microsoft 已确认这是在“适用范围”部分中列出的 Microsoft 产品存在的问题。