Showing posts from January, 2019

Adding a new table to Replication in MSSQL Server without reinitializing the Snapshot

There are some prerequisites for Tables to be a part of replication:
It should have a PRIMARY KEYIt should have IDENTITY NOT FOR REPLICATION NOT NULL: If prerequisites are not met for Primary key you will see the following error:
Msg 14088, Level 16, State 1, Procedure sp_MSrepl_addarticle, Line 1539 [Batch Start Line 0] The table '[dbo].[T_YourTableNameHere]' must have a primary key to be published using the transaction-based method. Though NOT FOR REPLICATION FOR IDENTITY will not throw any error during the time you are adding the table to replication but it will start throwing errors once you will start inserting rows or data into the table and I am guessing you must have heard this earlier "prevention is better than cure".

Alright once prerequisites has been taken care of  this tasks can be accomplished using the following steps :
Create table in Publisher Node.Create table in all Subscriber Nodes.Use sp_addarticle to add and publish the new table in your public…

Popular posts from this blog

Enabling fixed Sidebar for blogger Contempo template for screen sizes smaller than 1440px

Adding copy to clipboard button to every google code prettify pre blocks in blogger

Solution: More Posts & Posts Links not working with Adsense Anchor ads on Touch screen mobiles in blogger

Query to Expand and List All logins within a SQL Server Group

Powershell script to automatically send HTML emails using gmail smtp

Adding code prettify to Blogger