国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發(fā) > 綜合 > 正文

跳過事務復制中的錯誤

2024-07-21 02:47:31
字體:
來源:轉載
供稿:網友
跳過事務復制中的錯誤

前些天部署了一套事務復制環(huán)境,訂閱端只需要最近五年的數(shù)據(jù)。

復制采用的是備份文件初始化,復制搭好后用了一個腳本在訂閱端刪除五年前的數(shù)據(jù)。

今天早上復制出問題了。出現(xiàn)了The row was not found at the Subscriber when applying the replicated command.的錯誤

導致堆積了大量的未分發(fā)命令。

--------------------------------------------------------------------------------------------------------------------------

解決方案1):

根據(jù)http://technet.microsoft.com/en-us/library/ms151331(v=sql.105).aspx

在分發(fā)數(shù)據(jù)庫上運行:

sp_helpsubscriptionerrors [ @publisher = ] 'publisher' , [ @publisher_db = ] 'publisher_db' , [ @publication = ] 'publication' , [ @subscriber = ] 'subscriber' , [ @subscriber_db = ] 'subscriber_db'

找到返回值中最大的xact_seqno

之后在訂閱端數(shù)據(jù)庫上運行:

sp_setsubscriptionxactseqno [ @publisher = ] 'publisher' , [ @publisher_db = ] 'publisher_db' , [ @publication = ] 'publication' , [ @xact_seqno = ] xact_seqno

但是,如果再次出現(xiàn)同樣的問題,還得重復同樣的步驟來忽略錯誤。

--------------------------------------------------------------------------------------------------------------------------

解決方案2):

通過在分發(fā)代理配置文件中設置Continue On Data ConsistencyErrors,直接跳過事務復制中的錯誤。(因為我根本就不關心5年前的數(shù)據(jù)的變更)


發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 玉树县| 石首市| 澜沧| 高碑店市| 白玉县| 肇庆市| 石狮市| 辽阳县| 宁城县| 延川县| 琼中| 肇源县| 怀集县| 马鞍山市| 沂南县| 沂水县| 抚远县| 孝义市| 平安县| 大竹县| 胶南市| 鄱阳县| 大港区| 清远市| 定远县| 临城县| 新昌县| 贵德县| 台安县| 庆安县| 交口县| 杨浦区| 南通市| 嘉定区| 吉木乃县| 夏邑县| 谢通门县| 青阳县| 商水县| 天等县| 磐石市|