Transaction Replication - Doubts about Agent Snapshot

  • Hi,

    I have 2 SQLServer2000 Servers with Transaction Replication between them.

    I have the following doubt below:

    When I alter a table and put some new fields and  I run snapshot again,

    is there any way or option in agent snapshot properties to avoid

    -Drop the table on the Subscriber and Load the data again

    -Delete all data from the table on the subscriber

    My table is very big

    I need to distribute the new schema table only

    Thanks a lot in advance ,

    Heron Carlos

     

  • You need to,

    (A) Use sp_repladdcolumn to add columns to a Table that is marked for replication.

    (B) configure the snapshot properties to either drop the table or truncate it etc etc....


    Kindest Regards,

  • By using sp_replAddColumn there is no need to regenerate the snapshot, also there is no need to pause the server as Microsoft suggest.

    If you are using stored procedures to replicate transactions, then you can change those stored procedures, by adding variables (as columns) with NULL values as defaults.

    So all the pending transactions (the ones done when the table didn't have the new column, and the ones when the table had the new column) will be replicated by using those new variables or not.

  • Tks lot,

     

    I've solved the problem , i used the stored procedure as you said.

     

    Heron Carlos

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

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