Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Change replication order in Transaction Replication Expand / Collapse
Posted Friday, July 26, 2013 3:25 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, July 15, 2016 5:24 AM
Points: 43, Visits: 251

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!
Post #1477913
Posted Friday, July 26, 2013 3:41 AM


Group: General Forum Members
Last Login: Today @ 3:06 AM
Points: 476, Visits: 1,069
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.

Post #1477923
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse