SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to alter a primary key on a Replicated Table in SQL Server 2008


How to alter a primary key on a Replicated Table in SQL Server 2008

Author
Message
Aspet Golestanian Namagerdi
Aspet Golestanian Namagerdi
SSC Eights!
SSC Eights! (884 reputation)SSC Eights! (884 reputation)SSC Eights! (884 reputation)SSC Eights! (884 reputation)SSC Eights! (884 reputation)SSC Eights! (884 reputation)SSC Eights! (884 reputation)SSC Eights! (884 reputation)

Group: General Forum Members
Points: 884 Visits: 863
We have a table in Sql Server 2008 R2, which has been (Transactional Replication) replicated to two subscriber. We need to increase the size of primary key column from char(14) to char(28).This specific article is part of publication that includes other articles.

I fallowed the following steps and it wroked fine.

1- Remove that article from publication

2- Apply the changes on primary key on publisher and subscribers

3- Re-Add article to publication

When I checked the web,I noticed that many people were talking about fallowing steps:

1- drop the subscription

2- drop the article

3- modify the table

4- add the article
5- add the subscription

Do I need to drop the subscription?
Neeraj Dwivedi
Neeraj Dwivedi
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2105 Visits: 1341
You are doing it in perfectly right way. You do not have to drop the whole subscription.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search