Change replication order in Transaction Replication

  • Hello,

    I'am running into a small problem concerning transactional replication.

    The database we are trying to replicate has different views which use user defined stored procedures and functions.

    When we setup transactional replication and select tables, views, sp's and functions the replication failes with an error certain functions are not available for the view it is creating on the subscriber.

    When I create a new subscription with only the Tables, SP's and functions and replicate that it works fine. When I add the views to the publication, create a new snapshot and reinitialize the subscription it all works as well.

    It seems when you setup replication the order in which it creates articles is Tables -> Views -> SP's -> Functions.

    Is there a way to change this order into Functions -> SP's -> Views -> Tables so we won't run into error messages that certain functions are not available to create the view on the subscriber?

    Thanks for the help!

  • Two options are to use the pre and post execute options in the publication to run scripts so you could have the objects created via script instead of replicated.

    Or you can create multiple publications and initialse the subscriptions in the order you need them.

    MCITP SQL 2005, MCSA SQL 2012

Viewing 2 posts - 1 through 1 (of 1 total)

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