new table structure and replication

  • Hi,

    I want to alter the structure of some tables (adding fields) in a database that is being used for replication on seven portables.

    It seems that it is impossible to perform the changes without the need of building a complete new replica and that there is no way to let the synchronisation do the adaption to the structure of these tables, or to do the changes on the replicas and let them synchronise afterwards.

    Is there anyone who can help solving this problem?

    Thx

    Eddy Willaert

  • This was removed by the editor as SPAM

  • If you use SQL Server 2000 why don't you try with sp_repladdcolumn to add your columns. Check the BOL for more information and exceptions.

    You have to run this on the Publisher and the column change will automatically trasferred to the subscribers.

    Remeber to specify a default value of you are creating a not null column.

  • For adding new columns, this works fine. But what to do if you want the width of a let say char field?

  • It's little tricky... but not impossible...

    1. Find a downtime for the system

    2. Copy the data of the column you want to change into somewhere else, with the primary key

    3. Drop the constraints for that column and drop the column

    4. add the column with new properties

    5. update the column with the data you have backed up in step 2

    6. re create the constraints

    I know it's not very easy but will work fine.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply