Help....!!need to add one more column to publication DB

  • Hi

    I have got a requirement like need to add a column to publication table then what are the things I have to consider regarding Distibuter and Subcriber as well. Please let me know this is transactional replication. Please help me out on this.

    The data should be replicated.

    Thanks in advance,

    SQL kidd

  • If you just want to add a column to an existing article in a publication, you can use ALTER TABLE command itself. This command should be run in the publisher. Please note that this method works only in SQL 2005 and higher.

    When a table is altered in the publisher, the distributor will send the same command to the subscriber. It will also take care of all the stored procedures generated for replicating.

    -Roy

  • Roy,

    Don't we need to reinitialize the subscription if we need to alter the schema? I am not sure.

    Lk

  • No, there is no need to reinitialize the subscription. There are two requirements though. The column added should either be NULLABLE or should have a default constraint.

    -Roy

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

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