|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, March 13, 2013 9:40 PM
Points: 12,
Visits: 171
|
|
I have two SQL databases P and S. I created backup of P and restore the backup at S. Then I created a pull subscription from S to P without initialization (from http://msdn.microsoft.com/en-us/library/ms151246%28v=sql.105%29.aspx) by clearing the Initialize check box on the Initialize Subscriptions page of the New Subscription Wizard. That seems to work, and I can see that newly added rows to tables in P are replicated to S.
The problem arises when I tried to add a new article in P (with the option "Truncate existing data if object exist"). I cannot get the new article to replicate to S. I have tried to run the snapshot agent in S to create a new snapshot, but it does not help. Newly added rows to the added article are not replicated to S.
I don't know what's wrong here. I tried to repeat the steps with initialization (i.e. tick the "Initialize" check box on the New Subscription Wizard), then newly added article is successfully replicated.
Any ideas?
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 6:10 AM
Points: 2,470,
Visits: 2,062
|
|
You need to add the new article to the existing subscription (or create a new subscription if you prefer). Just creating a new article in an existing publication will not result in the article being replicated to an existing subscriber. Once the article is included in a subscription, a snapshot will be delivered (subject to how you created the subscription) to the subscriber.
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, March 13, 2013 9:40 PM
Points: 12,
Visits: 171
|
|
How to add the new article to the existing subscription? I am using pull subscriptions, I tried to run sp_refreshsubscriptions at the publisher, but it does not help. Running the snapshot agent results in "A snapshot was not generated because no subscriptions needed initialization".
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, March 13, 2013 9:40 PM
Points: 12,
Visits: 171
|
|
Found my situation is exactly the same as described here: http://www.sqlservercentral.com/Forums/Topic348837-291-1.aspx
This one is driving me crazy...
We are using Transactional Replication with the subscribers initialized from a backup (no snapshot). It's working great, but now we need to add several new articles to the publication and have them picked up in the subscribers.
The only way I can get this to work is to drop the subscriber, backup the published database, restore the previously made backup over the destination databases and then re-create the subscriptions. There has to be a better way?
I've tried using the sp_reinitializesubscription, but that doesn't work since we aren't using a snapshot. I've tried skipping the restore, and just creating the tables in both the source and destination databases. Doing this, the subscription is re-created sucessfully, but data in the new articles is not actually being replicated.
Replication isn't my forte, and the documentation on initializing with backups is pretty sparse, so any advice is appreciated.
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 6:10 AM
Points: 2,470,
Visits: 2,062
|
|
Your issue may be the same but the resolution is potentially not the best. You should be able to add the new article to the existing publication.
Unfortunately, I am at home and can't test this but you should be able to use sp_addarticle to include the new table/article in your publication. Once this is done, the run snapshot agent and the distribution agent should sort out the rest.
|
|
|
|