About Me

My photo
I am an MCSE in Data Management and Analytics, specializing in MS SQL Server, and an MCP in Azure. With over 19+ years of experience in the IT industry, I bring expertise in data management, Azure Cloud, Data Center Migration, Infrastructure Architecture planning, as well as Virtualization and automation. I have a deep passion for driving innovation through infrastructure automation, particularly using Terraform for efficient provisioning. If you're looking for guidance on automating your infrastructure or have questions about Azure, SQL Server, or cloud migration, feel free to reach out. I often write to capture my own experiences and insights for future reference, but I hope that sharing these experiences through my blog will help others on their journey as well. Thank you for reading!

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..