|
|
Question : How to alter a replicated table ?
|
|
Hello All !
I have a central DB that will be replicated to client workstation when using a specific application. In my central DB, I need to alter a table to change its length. I have tried a simple command alter table myTable alter column myColumn Varchar(50) But i get the following error : Cannot alter the table 'myTable' because it is being published for replication.
Is there a way of updating the column without stopping the replication ? (this would be a problem for the application using the replication). How can I do that ? Modifying the structure of the central DB will also update the structure of the replicated DB ?
Thanks ! Jarod
|
Answer : How to alter a replicated table ?
|
|
ShogunWade, thats exactly how we do it. Just for reference for others, sp_repladdcolumn and sp_repldropcolumn are the sps to be used if just adding or just dropping. However, we sometimes need to do more intricate changes and so as a general rule, we drop replication, make schema changes to both and stored procedure changes to both, potentially make data changes to both and then restart replication with no sync.
Paul
|
|
|
|
|