Replication: Adding articles to existing publication:


Following are the steps for adding articles to existing Transactional Replication without initializing old entries:


Adding articles to existing publication:


Allow_anonymous:
--First, change the allow_anonymous property of the publication to FALSE

EXEC sp_changepublication @publication = N'PubMplus_Transactions2' @property = N'allow_anonymous'
@value = 'False' 
GO
Immediate_Sync:

 --Next, disable Change immediate_sync
EXEC sp_changepublication @publication = N'PubMplus_Transactions2' @property = N'immediate_sync'
@value = 'False' 
GO


Following are articles with their row count that needs to added to existing replication.

Because of row count is greater than 10 lacs and if all articles are added at one time, then log space and blocking are main issues.


So we are adding one by one article and run snapshot agent after completion, add another article.

1. Invalidate the snapshot
EXEC sp_addarticle @publication = N'Adventureworks2016-Pub', @article =N'Cities', @source_object =N'Cities', @force_invalidate_snapshot=1

2. Refresh subscriptions 
EXEC sp_refreshsubscriptions @publication = N'Adventureworks2016-Pub'


Now, start Snapshot Agent using Replication monitor.


Check rows on the subscriber

Monitor the drive space and make sure free space is available.

Adding articles to existing publication:

Allow_anonymous:
--First, change the allow_anonymous property of the publication to FALSE

EXEC sp_changepublication @publication = N'PubMplus_Transactions2' @property = N'allow_anonymous'
@value = 'False' 
GO
Immediate_Sync:

 --Next, disable Change immediate_sync
EXEC sp_changepublication @publication = N'PubMplus_Transactions2' @property = N'immediate_sync'
@value = 'False' 
GO

Following are articles with their row count that needs to added to existing replication.

Because of row count is greater than 10lacs and if all articles are added at one time, then log space and blocking are main issues.

So we are adding one by one article and run snapshot agent after completion, add another article.

1. Invalidate the snapshot
EXEC sp_addarticle @publication = N'Adventureworks2016-Pub', @article =N'Cities', @source_object =N'Cities', @force_invalidate_snapshot=1

2. Refresh subscriptions 
EXEC sp_refreshsubscriptions @publication = N'Adventureworks2016-Pub'

Now, start Snapshot Agent using Replication monitor.

Check rows on the subscriber

Monitor the drive space and make sure free space is available.
Name

Azure Backup Database Clustering Crash Dumps DBCC Deadlock Link Server Log Shipping Maintenance Migration Mirroring Monitoring Performance Tuning Permissions Post Installations Prerequisites Replication Restore Database SQL Installations SQL on Linux SQL Uninstallations SSIS T-SQL Windows Server
false
ltr
item
hybriddba.blogspot.com: Replication: Adding articles to existing publication:
Replication: Adding articles to existing publication:
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnoBiUuEl3janeVH8tvjvTXUIbtKDdjf8LBspVS6dqgx4_d_KbJQfMZBg5-M2Z8Tfb47xL44Ov_JFv139B__NNlzA5Oy6YKluXYWLG9PJwRHcyM9I8VKq3xBa5jrqvMRE8uqfiftnRGmdG/s1600/1580650420792601-0.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnoBiUuEl3janeVH8tvjvTXUIbtKDdjf8LBspVS6dqgx4_d_KbJQfMZBg5-M2Z8Tfb47xL44Ov_JFv139B__NNlzA5Oy6YKluXYWLG9PJwRHcyM9I8VKq3xBa5jrqvMRE8uqfiftnRGmdG/s72-c/1580650420792601-0.png
hybriddba.blogspot.com
https://hybriddba.blogspot.com/2019/06/replication-adding-articles-to-existing.html
https://hybriddba.blogspot.com/
https://hybriddba.blogspot.com/
https://hybriddba.blogspot.com/2019/06/replication-adding-articles-to-existing.html
true
7679493960263860249
UTF-8
Not found any posts Not found any related posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU Tag ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Contents See also related Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy