adding column to the existing publication

  • How can we add a column without having to reinitialize the entire publication. What is the procedure to do it?

  • Is this for transactional replication? If so, did you try to use sp_repladdcolumn with @force_reinit_subscription = 0. Books online (BOL) describe this as the way to disable the reinitialization (but I don't remember if it works in practice). See link below for info.

    http://msdn2.microsoft.com/en-us/library/ms189464.aspx

  • Simple go to the replication properties and click on the 'Filter Columns' tab. at the bottom u would get a button named 'Add Column to table' when u click u r asked for the column name and the type also add NULL at the end because u cannot add a column with a not null constraint.

    RegarDs,

    JacX

  • Thankyou. My publication is on sql2k and the subscriber is on sql2k5. I wish to insert column through scripts and sp_repladdcolumn might not work on different version of sql server. And before inserting a column do i have to drop subscription and the article that is published. Should i stop snapshot and distribution agent first. So what is the best way. EM or script.

  • You must use sp_repladdcolumn if you do not want to reinitialize the publication.

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

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