Sql-Server
SQL Server 2005 合併複製失敗
我們有一個客戶在嘗試將客戶端(訂閱者)同步到伺服器(發布者)時收到以下錯誤:
2012-11-30 21:03:33.334 Percent Complete: 18 2012-11-30 21:03:33.334 Data validation failed for one or more articles. When troubleshooting, check the output log files for any errors that may be preventing data from being synchronized properly. Note that when error compensation or delete tracking functionalities are disabled for an article, non-convergence can occur. 2012-11-30 21:03:33.334 OLE DB Distributor 'EnvisionSQL\SQL2005': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)} 2012-11-30 21:03:33.506 Percent Complete: 0 2012-11-30 21:03:33.506 Category:NULL Source: Merge Process Number: -2147200953 Message: Data validation failed for one or more articles. When troubleshooting, check the output log files for any errors that may be preventing data from being synchronized properly. Note that when error compensation or delete tracking functionalities are disabled for an article, non-convergence can occur. 2012-11-30 21:03:33.521 Percent Complete: 0 2012-11-30 21:03:33.521 Category:NULL Source: Merge Process Number: -2147200953 Message: Article 'TB_CORE_DAILY' failed data validation (rowcount only). Rowcount actual: 80367, expected: 0. 2012-11-30 21:03:33.537 Percent Complete: 0 2012-11-30 21:03:33.537 Category:NULL Source: Merge Process Number: -2147200953 Message: Article 'TB_CORE_INSPECTION_VIOL' failed data validation (rowcount only). Rowcount actual: 19451, expected: 0.
伺服器是2005,本地數據庫引擎是2005 express。
什麼可能導致實際/預期行數不匹配?
我正在嘗試對此進行更多研究,所以我想我會重新啟動這個討論,看看其他人是否有一些意見。
我了解
rowcount
驗證的工作原理,但為什麼我會在具有已知數據的表上收到預期值 0?
只是為了補充或添加到其他答案
我要做的第一件事是打開詳細資訊:
Turn on verbose history (Replication monitor->Agent Profile->Verbose History) and use the -output parameter and select a destination for the output file (Subscriber Replication Job -> Edit Run Agent Job -> In the command window add -output C:\MyFilePath\FileName.log).
和:
看看下面命令的最新部分,你會看到輸出參數。
-Publisher [TCP-ODS01] -PublisherDB [concord_ods] -Publication [MERLIN_PUBLICATION] -Subscriber [MERLIN771] -SubscriberDB [ConCORD_ODS] -Distributor [TCP-MERGE01] -DistributorSecurityMode 1 -HostName [MERLIN771] -output C:\Replication\MERLIN771_1132.log
現在我們可以查看日誌文件。
現在您可以查看生成的日誌並從那裡繼續。範例(見下圖):
作業的命令是:
--This is the MERLIN307 subscriber, I am troubleshooting, outputting to the log at c:\replication and using the - VerbatimTextObjectScripting 0 option. -Publisher [TCP-ODS01] -PublisherDB [concord_ods] -Distributor [TCP-MERGE01] -Publication [MERLIN_PUBLICATION] -ReplicationType 2 -DistributorSecurityMode 1 -DynamicFilterHostName [MERLIN307] -DynamicSnapshotLocation [\\TCP-MERGE01\REPLDATA\\unc\TCP-ODS01_CONCORD_ODS_MERLIN_PUBLICATION\MERLIN307_9\] -PartitionId 9 -VerbatimTextObjectScripting 0 -output C:\Replication\MERLIN307-983.log
我不能特別直接回答您的情況,但我絕對可以使用上述步驟幫助您找出問題所在。
如果這聽起來令人困惑,請在下面發表評論,我將嘗試更具體。