我在 SQL Server 2005 中设置了事务复制,并且禁用了设置复制时创建的 DDL 触发器。在玩了一会儿(了解会发生什么)之后,事务被破坏了,因为我已经将发布者上的一列更改为VARCHAR
订阅INT
者上的列。我找到了两个程序,这将有助于跳过这个有问题的交易
EXEC sp_helpsubscriptionerrors
@publisher='DB1',@publisher_db='repl_test',@publication='repl_test_table',
@subscriber='DB2',@subscriber_db='repl_test'
这给了我一个结果集,我可以在其中看到错误(转换VARCHAR
为失败INT
)
id time [...] error_code error_text xact_seqno
24 2012-02-23 08:33:35.313 [...] 8114 Fehler beim Konvertieren des varchar-Datentyps in int. 0x00139791000CC79C000600000000
24 2012-02-23 08:33:35.310 [...] 8114 Fehler beim Konvertieren des varchar-Datentyps in int. 0x00139791000CC79C000600000000
[...]
我使用xact_seqno
来自结果(0x00139791000CC79C000600000000)在下一步执行以下过程
EXEC sp_setsubscriptionxactseqno
@publisher='DB1',@publisher_db='repl_test',@publication='repl_test_table',
@xact_seqno=0x00139791000CC79C000600000000
这会说:
错误 20017 - 订阅者上不存在订阅。
嗯?