![]() |
|
|
By: Mohammed Moinudheen | Read Comments (4) | Print Mohammed is a SQL Server DBA with over 6 years experience managing production databases for a few Fortune 500 companies. Related Tips: More |
|
I have transactional replication configured in my production environment with multiple subscribers. 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.
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.
In SSMS go to Replication -> Local Publications -> Locate your publication and expand it. The below screenshot shows the details of the subscriptions.
Suppose, you wish to reinitialize only the subscription [PHOENIX].[REP_S1]. To do this, right click that subscription and select the 'reinitialize' option and you will get a dialog window as shown in the below screenshot.
Here, we have the option to select either 'Use the current snapshot' or 'Use a new snapshot'. The use current snapshot will use the existing snapshot and the use a new snapshot will use a new current snapshot. Based on your requirement, select the desired option and then click on 'Mark for Reinitialization' which will enable you to reinitialize the subscription.
If you wish to reinitialize all subscriptions, you would need to right click on the publication and select 'Reinitialize All Subscriptions' as shown in the screenshot below, which would enable you to reinitialize all your subscriptions.
In SSMS go to Replication -> right click on replication and select 'Launch Replication Monitor', as shown below.
The 'replication monitor' screen should open as shown below. On the left pane, under 'My publishers', click on the publisher node and expand to get a list of the subscriptions.

In the 'All Subscriptions' tab, you need to select the appropriate subscription and click on 'Reinitialize Subscription' which would enable you to reinitialize only that subscription in the list. Once done, you would encounter the same window (image 2) 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.
If you wish to reinitialize all your subscriptions using replication monitor, you could just right click on the publication node and select 'Reinitialize All Subscriptions' as shown below.
Both options could be tested easily by configuring a simple replication setup and performing the sequence of steps as shown above.
| Share: | Share | Tweet |
|
![]() |
![]() |
Connect with MSSQLTips.com |
| Wednesday, December 14, 2011 - 1:45:23 PM - Ludwig Guevara | Read The Tip |
|
Hi:
Reference: http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.replication.replicationmonitor.enumlogreaderagents.aspx Regards |
|
| Thursday, December 15, 2011 - 2:29:03 AM - bojanna mk | Read The Tip |
|
Thanks Moinu.The article looks good and useful. |
|
| Thursday, December 15, 2011 - 2:30:02 AM - Srinath | Read The Tip |
|
Thats really good stuff, Moinu....Thanks much for this writing......Keep posting,. |
|
| Monday, January 09, 2012 - 5:00:25 PM - bebimbop | Read The Tip |
|
I've tried each of these methods multiple times and ALWAYS fall back to recreating the subscriptions. I've wasted many an hour trying to figure out which piece is misbehaving and what to restart, replication monitor is woefully inadequate in that regard.
If time is of the essence, just recreate the subscription. You will get back online faster.
|
|
|
privacy | disclaimer | copyright | advertise | about authors | contribute | feedback | giveaways | user groups Some names and products listed are the registered trademarks of their respective owners. Edgewood Solutions LLC | MSSharePointTips.com | MSSQLTips.com |