开发者

Adding new article to transactional replication gives error at subscriber

I have an updatable transactional replication set with SQL Server 2008. Everything is working fine. I added a new table to the existing publication thru sp_addarticle followed by sp_addsubscription. After that I ran the snapshot agent. Snapshot has been generated only for newly added table. So the new table was successfully replicated to subscriber. I could even able to replicate a newly inserted record into new table to subscriber. But vice versa is not possible. When I insert a record into new table in the subscriber database, I am getting an error

*Msg 515 'Cannot insert the value NULL into column 'msrepl_tran_version',
 table Servername.dbo.Tablename'; column does not allow nulls. INSERT fails.'*.

Please help me to resolve this issue.

Many Thanks in advance. Geeta开发者_如何学JAVA


Is it reproducible error? Is subscriber configured as Immediate Updating? In case of Immediate Updating subscriber the transaction fails whenever publisher (or network) is unavailable.

Check and change, if it does not have it, your table so that ms_repl_tran_version defaulted to GUID:

ALTER TABLE [dbo].[TableName] ADD CONSTRAINT [DFLT_GUID_msrepl] DEFAULT (newid()) FOR [msrepl_tran_version]

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜