altering subscription?

  • I have to change the schema of three tables which are replicated. Just tell me if i am wrong.

    I am planning to drop the subscription

    (exec sp_dropsubscription @publication = , @article =

    ', @subscriber = '', @destination_db = '') and

    then just drop these three articles

    (exec sp_droparticle @publication = ', @article = '

    ' and make the necessary changes and then again add these three articles , , and then add the subscription.

    (exec sp_addsubscription @publication = '', @article = '

    ', @subscriber = '', @destination_db = '')

    Will this process work or am i missing any step.

  • Are you doing snap shot replication?  If so, this is how I would change the schema using enterprise manager.

    Right Click the publication and select Properties.  On the Articles tab, drop the tables in question.

    Go make your schema changes.

    Add back the tables from the Articles tab.

    Right Click the publication and select Reintialize All Subscriptions.

    Steve

  • I am using a transactional replication, SQL Server 2000, SP4. do i have to follow any different process? If so would really appreciate if you could explain it.

    thanks

    amit

  • I have no experience with tansactional replication so I wouldn't know.  Sorry.

    Steve

  • If you're adding or dropping columns from a transactional pub you can do so without dropping the article, either using the repl gui or sp_repladdcolumn/dropcolumn. For column changes you typically drop the article as you outlined.

  • Thank you

  • It has been a long time since I have worked with replication and am in a similar situation.   I have a script that is from a third party vendor that will apply schema/table changes to a publisher database which is pushing transactional replication to another server.

     

    My thinking is that this might work and if anyoone has any insight please share

     

    1. exec sp_dropsubscription
    2. exec sp_droparticle
    3. Run the script which will modify tables...
    4. exec sp_addarticle
    5. run the snapshot agent.

    I do not have a place to test...aaargh

     


    "Keep Your Stick On the Ice" ..Red Green

  • Those steps will work. If you're only doing column add/drop you can make the changes without dropping the sub, but as soon as you need to alter a column you're stuck (unless you want to modify the procs by hand, etc).

Viewing 8 posts - 1 through 7 (of 7 total)

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