Add article backup restore transactional replication

  • Hi

    I have set up transactional replication using backup restore something like this.

    1) Backup A db

    2) Restore it as B

    3) Create Publication

    4) Create subcription with no snapshot.

    Now I want to add SP as article and I added it to publication.

    Now My confusion starts....I thought we need to generate a new snapshot and reinitalize subscription.

    am I right.....?assuming it what I did is right click publication and view snapshot status , started agent it says there is no A snapshot was not generated because no subscriptions needed initialization.and then tried running distribution agent ....but I dint see SP in B.

    Can someone tell me how to proceed furthur or anything I am missing..?

  • Since you've setup your replication from a backup you'll have to manually create the SP on the subscriber after creating in on the publisher...

    a) Create the SP on the publisher

    b) Add the SP to the list of articles in the publication (if doing this from the UI then just add it to the publication - if doing it from scripts then you'll need to run sp_refreshsubscriptions after sp_addarticle)

    c) Create the SP on the subscriber

    Once this is done - you can test it out by altering the SP on the publisher and the modified SP code should flow down to the subscriber.

    My recommendation (if feasible for you) is to have SPs and views (i.e. code) in a separate publication from the tables - mainly from a maintenance perspective and so that if you have to - for whatever reason - reinitialize the SPs or views you can do it without affecting the tables being replicated.

  • Thank u I will try and let u know

    Is it the same for SQL 2000 and SQL 2005 transactional replication,

    I know the DDL changes are replicated with shema changes property set to true on publication for sql 2005...?

    Can you let me know the procedure with merge replication also..?

  • I don't know about SQL 2000 replication...I'm pretty sure it should work the same for merge replication but I might be wrong 🙂

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply