Monday, February 20, 2012

Replicating structural changes

Hi,
Is it possible to replicate structural changes? I've been reading the
replication docs, and it looks to me that this is only possible using
snapshot replication (ie. not on the fly).
Any products that can do better replication (all additions/changes to
all db objects for a given db) than the natively supported?
Thanks,
Morten
Morten,
sp_repladdcolumn and sp_repldropcolumn can be used for most simple column
schema changes, and such changes can be done on the fly. You can't change an
existing (replicated) column directly - eg change the datatype from int to
varchar, but these 2 stored procedures can be used to make such changes
indirectly. Many other schema changes are not part of the replication
framework - eg adding an index or most constraints but these can be sent to
subscribers using sp_addscriptexec.
HTH,
Paul Ibison

No comments:

Post a Comment