About Me

My photo
I am MCSE in Data Management and Analytics with specialization in MS SQL Server and MCP in Azure. I have over 13+ years of experience in IT industry with expertise in data management, Azure Cloud, Data-Canter Migration, Infrastructure Architecture planning and Virtualization and automation. Contact me if you are looking for any sort of guidance in getting your Infrastructure provisioning automated through Terraform. I sometime write for a place to store my own experiences for future search and read by own blog but can hopefully help others along the way. Thanks.

How to add Table to Existing Transactional -Replication when database size is approx 1 TB.

How to add Table to Existing Transactional -Replication when database size is approx 1 TB.



EXEC sp_changepublication
@publication =’AdventureWorks2014_pub’,
@property = N'allow_anonymous',
@value = 'false'
GO

EXEC sp_changepublication
@publication = ‘
AdventureWorks2014_pub’,
@property = N'immediate_sync',
@value = 'false'
GO


Execute
sp_helppublication ’AdventureWorks2014_pub’ and then make sure value for 

allow_anonymous  = 0
immediate_sync = 0 

by default this value remains  1.

If 1 means snapshot agent will generate snapshot for all articles...
"0" means snapshot agent will  generate snapshot for that  articles, and snapshot will apply to that article only.


Then Add a specific  table in existing publication..

How ?
 On the Articles page of the Publication Properties - <Publication> dialog box, clear the "Show only checked objects in the list" check box. This allows you to see the unpublished objects in the publication database.
Select the check box next to each article you want to add.
Click OK. 
Then generate  a snapshot for that Publication from replication monitor.
you will notice Snapshot will generate for that specific  article, the article which you added in previous step.

Check whether Repl- Distribution job for that publication is in running status or not.
if not in a running  state, kindly execute, if executing then go to replication monitor and for that specific publication go to Distributor to Subscriber History and make sure all shows green and you will find screen as below..


This indicates and summarize that  Replication for that specific article has completed successfully and data has been transferred to the subscriber.

Thanks for reading..