SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Change replication order in Transaction Replication


Change replication order in Transaction Replication

Author
Message
Enrico van de Laar
Enrico van de Laar
SSC Rookie
SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)SSC Rookie (49 reputation)

Group: General Forum Members
Points: 49 Visits: 251
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!
RTaylor2208
RTaylor2208
SSC Eights!
SSC Eights! (952 reputation)SSC Eights! (952 reputation)SSC Eights! (952 reputation)SSC Eights! (952 reputation)SSC Eights! (952 reputation)SSC Eights! (952 reputation)SSC Eights! (952 reputation)SSC Eights! (952 reputation)

Group: General Forum Members
Points: 952 Visits: 1191
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search