Views and Replication | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Views and Replication

If I add a View to a database that is being replicated using Tranactional replication will the View automatically get replicated to the Subscribers as well?
Hi ya, no DDL does not replicate across automatically, except adding/dropping columns using the sp_repladdcolumn/sp_repldropcolumn. You’d have to run the view creation script on every subscriber too Cheers
Twan
If I add a new table to a database and add the table to the publication via sp_addarticle will it get replicated to the subscribers the next time it runs or do I have to drop all subscriptions then add the subscriptions back before the new article will be included?
quote:Originally posted by Twan Hi ya, no DDL does not replicate across automatically, except adding/dropping columns using the sp_repladdcolumn/sp_repldropcolumn. You’d have to run the view creation script on every subscriber too Cheers
Twan


Hi ya, I think that it will force you to resync each subscriber, requiring a full snapshot to run. The sp_addarticle has a parameter to force subscribers to be invalidated, try running sp_addarticle with that parameter set to 0. If there is no error then it will replicate across, otherwise it will require a full resync of all subscribers in any case you won’t need to drop/recreate the subscribers Cheers
Twan
]]>