Thursday, February 16, 2012

Changing field length whilst replicating

Hi
I have two databases that are merged using replication, and I want to change the length of one of the fields. Can anyone think of a way of doing it that doesn't require dropping the whole publication and rebuilding it? Thanks EdYou don't have to drop the entire publication. You have two options, one is to drop the subscription and the article to change the DDL and add the subscription then intialize it. The other is to use sp_repldropcolumn and sp_repladdcolumn to drop the old column and add it back with the length you want without dropping the subscription and the article. Of course, you need to save the data somewhere to add it backup in when the new column got recreated.|||Brilliant, Thanks Ed

No comments:

Post a Comment