
{"id":6996,"date":"2022-06-08T10:16:39","date_gmt":"2022-06-08T10:16:39","guid":{"rendered":"https:\/\/rax-stg-wp-aws.com\/blogs\/adding-new-articles-reinitializing-the-existing-sql-server-transactional-replication\/"},"modified":"2026-11-03T19:27:25","modified_gmt":"2026-11-03T19:27:25","slug":"adding-new-articles-reinitializing-the-existing-sql-server-transactional-replication","status":"publish","type":"blogs","link":"https:\/\/www.rackspace.com\/de\/blogs\/adding-new-articles-reinitializing-the-existing-sql-server-transactional-replication\/","title":{"rendered":"Adding new articles &#038; reinitializing the existing SQL Server transactional replication"},"content":{"rendered":"<p>Previously, we had discussed how to repGenerally, a user tends to use a snapshot agent to add any new articles to the publication or reinitializing the subscriber, however, in this scenario, we have already configured the transactional replication using the database backup.<\/p>\n<p><strong>Introduction<\/strong><\/p>\n<p>Generally, a user tends to use a snapshot agent to add any new articles to the publication or reinitializing the subscriber, however, in this scenario, we have already configured the transactional replication using the database backup.<br \/>\nThe following are the detailed steps:&nbsp;<\/p>\n<ol>\n<li>Add new articles to the existing publication that was initialized with the backup.<\/li>\n<li>Reinitialize the subscriber that was already initialized with the backup.<\/li>\n<\/ol>\n<h4>Scenario 1: How to Add new articles to the existing publication which was initialized with the backup<\/h4>\n<p>In our scenario, transactional replication has already been configured using the backup file as follows:<\/p>\n<p><strong>Publisher + Distributor<\/strong>: Node1<br \/>\n<strong>Subscriber<\/strong>: Node2<br \/>\n<strong>Publisher Database <\/strong>: ABC_Pub<br \/>\n<strong>Subscriber Database<\/strong>: ABC_Sub<br \/>\nPublication: ABC_Pub_Bkp<br \/>\n<strong>Subscription<\/strong>: ABC_Sub_Bkp<br \/>\n<strong>Articles<\/strong>: Cars, bikes<\/p>\n<p><strong>Process Steps Overview:<\/strong><\/p>\n<p>Adding new articles to the existing publication can be done by manually synchronizing the data (which we will discuss with the detailed steps) between the publisher and the subscriber.<\/p>\n<p>1. Synchronize the data for new articles from publisher to subscriber using any popular import\/export method.<\/p>\n<p>&nbsp;Add new tables to the publisher database and insert a few rows.&nbsp;<\/p>\n<p>&nbsp; &nbsp;&#8211; &nbsp;&nbsp; &nbsp;Script the create definition for new tables and execute on subscriber database.<\/p>\n<p>&nbsp; &nbsp;&#8211; &nbsp;&nbsp; &nbsp;Use export\\import method to sync the data between the publisher and subscriber.&nbsp;<\/p>\n<p>2. Stop the Log reader and Distributor agent jobs.<\/p>\n<p>3. Add the new articles to the publication using GUI to complete the configuration.<\/p>\n<p>4. Enable and start Log reader and distributor agent jobs.<\/p>\n<p>5. Insert new data on publisher.<\/p>\n<p>6. Validate the data on subscriber.<\/p>\n<p><strong>Step 1: Synchronize the data for new articles from publisher to subscriber using import\/export method<\/strong>.&nbsp;<\/p>\n<p>Articles on the existing replication<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26057-body-Picture1_1.png\" alt=\"new articles on DB Picture1\" \/><\/p>\n<ul>\n<li>Add new tables to the publisher database and insert a few rows.&nbsp;<\/li>\n<li>Script the create definition for new tables and execute on subscriber database.<\/li>\n<li>Use export\\import method to sync the data between the publisher and subscriber.&nbsp;<\/li>\n<\/ul>\n<p>2.&nbsp;&nbsp; &nbsp;Stop the Log reader and Distributor agent jobs.<br \/>\n3.&nbsp;&nbsp; &nbsp;Add the new articles to the publication using GUI to complete the configuration.<br \/>\n4.&nbsp;&nbsp; &nbsp;Enable and start Log reader and distributor agent jobs.<br \/>\n5.&nbsp;&nbsp; &nbsp;Insert new data on publisher.<br \/>\n6.&nbsp;&nbsp; &nbsp;Validate the data on subscriber<\/p>\n<p><strong>Step 1: Synchronize the data for new articles from publisher to subscriber using import\/export method.<\/strong><\/p>\n<p>In the existing replication, there are two articles, and I will be creating two more tables for the publisher database and later add them to the replication<\/p>\n<p><strong>Articles on the existing replication:<\/strong><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26057-body-Picture1_2.png\" alt=\"articles on DB Picture 1\" \/><\/p>\n<p>I have created two new tables in the publisher database and added a few rows to each table. Now script the create definition for both tables and execute on subscriber database.<\/p>\n<p><strong>Two new tables were created on the publisher database:<\/strong>&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26057-body-Picture2_4.png\" alt=\"articles on DB Picture 2\" \/><\/p>\n<p><strong>Created tables on subscriber using the definition from publisher:&nbsp;<\/strong><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26057-body-Picture3_4.png\" alt=\"articles on DB Picture 3\" \/><\/p>\n<p>\nNow let&#8217;s sync the data between the publisher and subscriber using the import\\export method:&nbsp;<\/p>\n<p><em>Right click on the publisher database -&gt; Select Export data -&gt; Follow the wizard to pass the required information.<\/em>&nbsp;<\/p>\n<p><em>Select the source server (Publisher) and Database Name:<\/em><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26057-body-Picture4_6.png\" alt=\"articles on DB Picture 4\" \/><\/p>\n<p><strong>In the next step, Select Destination server (Subscriber) and database name:<\/strong><\/p>\n<p>Select the table names to transfer the data and click next<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26057-body-Picture6_5.png\" alt=\"articles on BD Picture 6\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26057-body-Picture6_4.png\" alt=\"articles on DB Picture 6\" \/><\/p>\n<p>&nbsp;<strong>In the next step, Export was successful:<\/strong><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26057-body-Picture8_1.png\" alt=\"articles on DBPicture 7 \" \/><\/p>\n<p><strong>Validating the data:<\/strong><\/p>\n<p>As you can see, the data has synced between the publisher and subscriber.<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26057-body-Picture9.png\" alt=\"articles on DB Picture 9\" \/><\/p>\n<p>1. Stop the Log reader and the distributor agent jobs\u2013&nbsp;<\/p>\n<p>Stalling the replication agents is the best recommended practice before doing any operations with the articles.&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26057-body-Picture10_1.png\" alt=\"Article on DB Picture 9\" \/><\/p>\n<p>2. Add the new articles to the publication using GUI to complete the configuration<\/p>\n<p>Right click on the publication under the replication folder and choose properties &#8211; &gt; Navigate to Articles page -&gt; uncheck <strong>Show only checked articles in the list <\/strong>-&gt; Select the two new articles under the <strong>objects to publish<\/strong> i.e. Country and Customer in our case and click OK to finish the configuration.&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26057-body-Picture10_2.png\" alt=\"Articles on DB Picture 10\" \/><\/p>\n<p><strong>Enable and start Log reader and distributor agent jobs \u2013&nbsp;&nbsp;<\/strong><\/p>\n<p>Once the agent has been enabled and started, the newly added records should be captured by log reader and then replicate to the subscriber by distributor agent. In the next step, data will be validated.&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26057-body-Picture11.png\" alt=\"replication on DB Picture 11\" \/><\/p>\n<p><strong>Insert new data on publisher.<\/strong>&nbsp;<\/p>\n<p>Now I will add data on both the publisher tables to add 5 more records on each table.<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26057-body-Picture12_1.png\" alt=\"Articles on DB Picture 12\" \/><\/p>\n<p><strong>Validate the data on subscriber:&nbsp;<\/strong><\/p>\n<p>Post validating the data, you will now see that 5 new records have been added (with total 10 rows) on both the tables. The same have been replicated to the subscriber.<\/p>\n<p><strong>Replication health status<\/strong><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26057-body-Picture14_1.png\" alt=\"articles on DB Picture 14\" \/><\/p>\n<p><strong>Scenario 2: How to Reinitialize the subscriber that was already initialized with backup:<\/strong><\/p>\n<p>Moving to the second scenario where sometimes we are left with the last option to fix any synchronization issues with the replication by Reinitializing the subscriber.&nbsp;<\/p>\n<p>In our case, we have initialized the replication through backup and the following is the process steps to reinitialize the subscriber.<\/p>\n<p>1.&nbsp;&nbsp; &nbsp;Stop the Log reader, distributor agent and distributor cleanup jobs.&nbsp;<br \/>\n2.&nbsp;&nbsp; &nbsp;Take the full backup for the publisher database and disable the T-Log backup job.&nbsp;<br \/>\n3.&nbsp;&nbsp; &nbsp;Restore the database on subscriber database with replace.&nbsp;<br \/>\n4.&nbsp;&nbsp; &nbsp;Validate the data.&nbsp;<br \/>\n5.&nbsp;&nbsp; &nbsp;Run sp_addsubscription<br \/>\n6.&nbsp;&nbsp; &nbsp;Enable Log reader and distributor jobs, insert new records on the publisher database and validate the data on subscriber.<\/p>\n<p><strong>Stop the Log reader and distributor agent jobs.&nbsp;<\/strong><\/p>\n<p>Stopping the replication agents is the best recommended practice before doing any operations with the articles.<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26057-body-Picture15_1.png\" alt=\"articles on DB 15\" \/><\/p>\n<p><strong>Take full backup for the publisher database and disable the T-Log backup job.&nbsp;<\/strong><\/p>\n<p>Trigger full backup for the database ABC_Pub on publisher server and disable the T-Log backup job if any.&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26057-body-Picture16_0.png\" alt=\"replication on DB Picture 16\" \/><\/p>\n<p><strong>Restore the database on subscriber database with replace and norecovery&nbsp;<\/strong><\/p>\n<p><strong>Restore subscriber database ABC_Sub with Replace:<\/strong><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26057-body-Picture17_0.png\" alt=\"Article on DB Picture 17\" \/><\/p>\n<p><strong>Validate the data between publisher and subscriber database.<\/strong><\/p>\n<p>Data has been validated and as shown in the following snapshot, both Cars and Bikes table have 5 records each and Country and customer table has 10 records each.<br \/>\n&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26057-body-Picture22_0.png\" alt=\"Article on DB Picture 22\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Health check for replication<\/strong><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26057-body-Picture23.png\" alt=\"Add articles to DB\" \/><\/p>\n<h3>&nbsp;<\/h3>\n","protected":false},"excerpt":{"rendered":"<p>Adding new articles &#038; reinitializing the existing SQL Server transactional replication<\/p>\n","protected":false},"author":2,"featured_media":6998,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","format":"standard","meta":{"content-type":"","nid":"26057","content_type":"blog","created_by":"10130","authored_on":"2023-09-19T10:16:39+00:00","field_article_industries":"","tag_category":"Technical","field_blog_author_text":"by Rackspace Technology Staff","seo_description":"Add new articles to existing publications and reinitialize subscribers in SQL Server transactional replication. Boost system efficiency and data integrity.","field_featured_image":"","insights_image":"\/wp-content\/uploads\/2026\/blog_technical_images\/26057-insights_image-database-technical-blog-1-insights.jpg","field_partners":"","rxt_platforms":"Microsoft SQL","product":"","publisheddate":"2022-06-08T10:16:39","rxt_solutions":"Databases, Data Strategy & Governance","opengraph_tag":"","x_tag":"","teaser_flag":"Technical Blog","seo_titile":"Adding New Articles & Reinitializing Existing SQL Server","field_topics":"","field_slug":"adding-new-articles-reinitializing-the-subscriber-for-sql-transaction","footnotes":""},"categories":[178],"tags":[204],"class_list":["post-6996","blogs","type-blogs","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-technical"],"_links":{"self":[{"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/blogs\/6996","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/blogs"}],"about":[{"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/types\/blogs"}],"author":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/comments?post=6996"}],"version-history":[{"count":2,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/blogs\/6996\/revisions"}],"predecessor-version":[{"id":8711,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/blogs\/6996\/revisions\/8711"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/media\/6998"}],"wp:attachment":[{"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/media?parent=6996"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/categories?post=6996"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/tags?post=6996"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}