{"id":868,"date":"2015-01-03T20:47:24","date_gmt":"2015-01-03T14:47:24","guid":{"rendered":"http:\/\/dotnetsql.info\/net-sql\/?p=868"},"modified":"2015-07-09T16:21:13","modified_gmt":"2015-07-09T10:21:13","slug":"reinitialize-subscriptions-in-sql-server-replication","status":"publish","type":"post","link":"http:\/\/dotnetsql.info\/net-sql\/index.php\/reinitialize-subscriptions-in-sql-server-replication\/","title":{"rendered":"Reinitialize subscriptions in SQL Server replication"},"content":{"rendered":"<h3><strong>Scenario<\/strong><\/h3>\n<p>You have a transactional replication configured in your production environment with multiple subscribers.\u00a0 The business team has requested that one of the subscriptions be reinitialized, because they think there is some missing data. In this tip we look at the different options that you can use to reinitialize a subscription for transactional replication.<\/p>\n<p><strong>Solution<\/strong><\/p>\n<p>If we come across this requirement there are different ways by which we could achieve this. In this tip, we will accomplish this by using SQL Server Management Studio (SSMS) and Replication Monitor. Note, both options assume transactional replication is already configured in your server.<!--more--><\/p>\n<p><strong>Option 1<\/strong> : Using SQL Server Management Studio (SSMS).<\/p>\n<p>In SSMS go to <strong>Replication<\/strong> -&gt; <strong>Local Publications<\/strong> -&gt; Locate your <strong>publication<\/strong> and expand it.<\/p>\n<p>Suppose, you wish to reinitialize only the subscription [SUBSCRIP1].[REP_S1].\u00a0 To do this, right click that subscription and select the &#8216;reinitialize&#8217; option and you will get a dialog window.<\/p>\n<p>Here, we have the option to select either &#8216;Use the current snapshot&#8217; or &#8216;Use a new snapshot&#8217;. The use current snapshot will use the existing snapshot and the use a new snapshot will use a new current snapshot.<\/p>\n<p>Based on your requirement, select the desired option and then click on &#8216;Mark for Reinitialization&#8217; which will enable you to reinitialize the subscription.<\/p>\n<p>If you wish to reinitialize all subscriptions, you would need to right click on the publication and select &#8216;Reinitialize All Subscriptions&#8217;, which would enable you to reinitialize all your subscriptions.<\/p>\n<p><strong>Option 2<\/strong>: Using Replication Monitor<\/p>\n<p>In SSMS go to <strong>Replication<\/strong> -&gt; right click on replication and select &#8216;Launch Replication Monitor&#8217;.<\/p>\n<p>The &#8216;replication monitor&#8217; screen should open. On the left pane, under &#8216;My publishers&#8217;, click on the publisher node and expand to get a list of the subscriptions.<\/p>\n<p>In the &#8216;All Subscriptions&#8217; tab, you need to select the appropriate subscription and click on &#8216;Reinitialize Subscription&#8217; which would enable you to reinitialize only that subscription in the list.<\/p>\n<p>Once done, you would encounter the same window as shown in option 1, when you reinitialize a subscription and you would need to either select the existing snapshot or opt for a new one.<\/p>\n<p>If you wish to reinitialize all your subscriptions using replication monitor, you could just right click on the publication node and select &#8216;Reinitialize All Subscriptions&#8217;.<\/p>\n<p>&nbsp;<\/p>\n<p>Both options could be tested easily by configuring a simple replication setup and performing the sequence of steps as detailed above.<\/p>\n<p><strong>Thanks for reading this article,<\/strong><\/p>\n<p><strong>Next steps :<\/strong><\/p>\n<ol>\n<li><strong>Share this with your colleagues because Sharingis Learning<\/strong><\/li>\n<li><strong>Comment below if you need any assistance<\/strong><\/li>\n<\/ol>\n<p style=\"text-align: right;\"><em><strong>Powered by <a href=\"http:\/\/www.codereview.co\">CodeReview &#8211; Let&#8217;s make it Better!<\/a><\/strong><\/em><\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-twitter\"><a rel=\"nofollow\" data-shared=\"sharing-twitter-868\" class=\"share-twitter sd-button share-icon no-text\" href=\"http:\/\/dotnetsql.info\/net-sql\/index.php\/reinitialize-subscriptions-in-sql-server-replication\/?share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Twitter (Opens in new window)<\/span><\/a><\/li><li class=\"share-linkedin\"><a rel=\"nofollow\" data-shared=\"sharing-linkedin-868\" class=\"share-linkedin sd-button share-icon no-text\" href=\"http:\/\/dotnetsql.info\/net-sql\/index.php\/reinitialize-subscriptions-in-sql-server-replication\/?share=linkedin\" target=\"_blank\" title=\"Click to share on LinkedIn\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on LinkedIn (Opens in new window)<\/span><\/a><\/li><li class=\"share-facebook\"><a rel=\"nofollow\" data-shared=\"sharing-facebook-868\" class=\"share-facebook sd-button share-icon no-text\" href=\"http:\/\/dotnetsql.info\/net-sql\/index.php\/reinitialize-subscriptions-in-sql-server-replication\/?share=facebook\" target=\"_blank\" title=\"Share on Facebook\"><span><\/span><span class=\"sharing-screen-reader-text\">Share on Facebook (Opens in new window)<\/span><\/a><\/li><li class=\"share-google-plus-1\"><a rel=\"nofollow\" data-shared=\"sharing-google-868\" class=\"share-google-plus-1 sd-button share-icon no-text\" href=\"http:\/\/dotnetsql.info\/net-sql\/index.php\/reinitialize-subscriptions-in-sql-server-replication\/?share=google-plus-1\" target=\"_blank\" title=\"Click to share on Google+\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Google+ (Opens in new window)<\/span><\/a><\/li><li class=\"share-pocket\"><a rel=\"nofollow\" data-shared=\"\" class=\"share-pocket sd-button share-icon no-text\" href=\"http:\/\/dotnetsql.info\/net-sql\/index.php\/reinitialize-subscriptions-in-sql-server-replication\/?share=pocket\" target=\"_blank\" title=\"Click to share on Pocket\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Pocket (Opens in new window)<\/span><\/a><\/li><li class=\"share-email\"><a rel=\"nofollow\" data-shared=\"\" class=\"share-email sd-button share-icon no-text\" href=\"http:\/\/dotnetsql.info\/net-sql\/index.php\/reinitialize-subscriptions-in-sql-server-replication\/?share=email\" target=\"_blank\" title=\"Click to email this to a friend\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to email this to a friend (Opens in new window)<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div><div class='sharedaddy sd-block sd-like jetpack-likes-widget-wrapper jetpack-likes-widget-unloaded' id='like-post-wrapper-76243027-868-69d7092b8e0ca' data-src='\/\/widgets.wp.com\/likes\/#blog_id=76243027&amp;post_id=868&amp;origin=dotnetsql.info&amp;obj_id=76243027-868-69d7092b8e0ca' data-name='like-post-frame-76243027-868-69d7092b8e0ca'><h3 class='sd-title'>Like this:<\/h3><div class='likes-widget-placeholder post-likes-widget-placeholder' style='height:55px'><span class='button'><span>Like<\/span><\/span> <span class=\"loading\">Loading...<\/span><\/div><span class='sd-text-color'><\/span><a class='sd-link-color'><\/a><\/div>","protected":false},"excerpt":{"rendered":"<p>Scenario You have a transactional replication configured in your production environment with multiple subscribers.\u00a0 The business team has requested that one of the subscriptions be reinitialized, because they think there is some missing data. In this tip we look at the different options that you can use to reinitialize a subscription for transactional replication. Solution &hellip; <a href=\"http:\/\/dotnetsql.info\/net-sql\/index.php\/reinitialize-subscriptions-in-sql-server-replication\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Reinitialize subscriptions in SQL Server replication<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-twitter\"><a rel=\"nofollow\" data-shared=\"sharing-twitter-868\" class=\"share-twitter sd-button share-icon no-text\" href=\"http:\/\/dotnetsql.info\/net-sql\/index.php\/reinitialize-subscriptions-in-sql-server-replication\/?share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Twitter (Opens in new window)<\/span><\/a><\/li><li class=\"share-linkedin\"><a rel=\"nofollow\" data-shared=\"sharing-linkedin-868\" class=\"share-linkedin sd-button share-icon no-text\" href=\"http:\/\/dotnetsql.info\/net-sql\/index.php\/reinitialize-subscriptions-in-sql-server-replication\/?share=linkedin\" target=\"_blank\" title=\"Click to share on LinkedIn\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on LinkedIn (Opens in new window)<\/span><\/a><\/li><li class=\"share-facebook\"><a rel=\"nofollow\" data-shared=\"sharing-facebook-868\" class=\"share-facebook sd-button share-icon no-text\" href=\"http:\/\/dotnetsql.info\/net-sql\/index.php\/reinitialize-subscriptions-in-sql-server-replication\/?share=facebook\" target=\"_blank\" title=\"Share on Facebook\"><span><\/span><span class=\"sharing-screen-reader-text\">Share on Facebook (Opens in new window)<\/span><\/a><\/li><li class=\"share-google-plus-1\"><a rel=\"nofollow\" data-shared=\"sharing-google-868\" class=\"share-google-plus-1 sd-button share-icon no-text\" href=\"http:\/\/dotnetsql.info\/net-sql\/index.php\/reinitialize-subscriptions-in-sql-server-replication\/?share=google-plus-1\" target=\"_blank\" title=\"Click to share on Google+\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Google+ (Opens in new window)<\/span><\/a><\/li><li class=\"share-pocket\"><a rel=\"nofollow\" data-shared=\"\" class=\"share-pocket sd-button share-icon no-text\" href=\"http:\/\/dotnetsql.info\/net-sql\/index.php\/reinitialize-subscriptions-in-sql-server-replication\/?share=pocket\" target=\"_blank\" title=\"Click to share on Pocket\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Pocket (Opens in new window)<\/span><\/a><\/li><li class=\"share-email\"><a rel=\"nofollow\" data-shared=\"\" class=\"share-email sd-button share-icon no-text\" href=\"http:\/\/dotnetsql.info\/net-sql\/index.php\/reinitialize-subscriptions-in-sql-server-replication\/?share=email\" target=\"_blank\" title=\"Click to email this to a friend\"><span><\/span><span class=\"sharing-screen-reader-text\">Click to email this to a friend (Opens in new window)<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div><div class='sharedaddy sd-block sd-like jetpack-likes-widget-wrapper jetpack-likes-widget-unloaded' id='like-post-wrapper-76243027-868-69d7092b8e5be' data-src='\/\/widgets.wp.com\/likes\/#blog_id=76243027&amp;post_id=868&amp;origin=dotnetsql.info&amp;obj_id=76243027-868-69d7092b8e5be' data-name='like-post-frame-76243027-868-69d7092b8e5be'><h3 class='sd-title'>Like this:<\/h3><div class='likes-widget-placeholder post-likes-widget-placeholder' style='height:55px'><span class='button'><span>Like<\/span><\/span> <span class=\"loading\">Loading...<\/span><\/div><span class='sd-text-color'><\/span><a class='sd-link-color'><\/a><\/div>","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[25],"tags":[273,269,97,40,274],"aioseo_notices":[],"_links":{"self":[{"href":"http:\/\/dotnetsql.info\/net-sql\/index.php\/wp-json\/wp\/v2\/posts\/868"}],"collection":[{"href":"http:\/\/dotnetsql.info\/net-sql\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/dotnetsql.info\/net-sql\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/dotnetsql.info\/net-sql\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/dotnetsql.info\/net-sql\/index.php\/wp-json\/wp\/v2\/comments?post=868"}],"version-history":[{"count":6,"href":"http:\/\/dotnetsql.info\/net-sql\/index.php\/wp-json\/wp\/v2\/posts\/868\/revisions"}],"predecessor-version":[{"id":1003,"href":"http:\/\/dotnetsql.info\/net-sql\/index.php\/wp-json\/wp\/v2\/posts\/868\/revisions\/1003"}],"wp:attachment":[{"href":"http:\/\/dotnetsql.info\/net-sql\/index.php\/wp-json\/wp\/v2\/media?parent=868"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/dotnetsql.info\/net-sql\/index.php\/wp-json\/wp\/v2\/categories?post=868"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/dotnetsql.info\/net-sql\/index.php\/wp-json\/wp\/v2\/tags?post=868"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}