Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to maintain IDENTITY property of a column on both publishing and subscribing databases in transactional replication?

0
Posted

How to maintain IDENTITY property of a column on both publishing and subscribing databases in transactional replication?

0

If you maintain IDENTITY property on the subscribing table, distribution agent fails with the following error even after creating the publisher’s IDENTITY property with NOT FOR REPLICATION option: An explicit value for the identity column in table ‘t1’ can only be specified when a column list is used and IDENTITY_INSERT is ON. Category: Data source Source: Number: 8101 Follow these steps to maintain IDENTITY property of a column on both publishing and subscribing databases: 1) Before subscribing, you must create the table at the subscriber (by default, replication will not transfer the IDENTITY property to the subscribers) and don’t forget to create the IDENTITY property with NOT FOR REPLICATION option. 2) After creating the publication, go to publication properties window and choose the Articles tab. Click on the properties button (…) against the table that has IDENTITY property. Go to ‘Snapshot’ tab. Choose ‘Keep the existing table unchanged’. 3) By default SQL Server

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123