Tuesday, March 6, 2012

Adding more keys in a table

Hi All,
I'm running merge replication.
I want to add some keys for existing fields in a replicated table (composite
keys). Is it possible? How to do that?
Thanks
use sp_repladdcolumn for this. When I hear the term composite keys I think
a primary key consisting of more than one column. Replication normally
complains when you change a PK.
"echo" <echo@.discussions.microsoft.com> wrote in message
news:462ECC14-6DF7-4D12-9B46-3744B388B563@.microsoft.com...
> Hi All,
> I'm running merge replication.
> I want to add some keys for existing fields in a replicated table
(composite
> keys). Is it possible? How to do that?
> Thanks
|||Hi Hilary,
That's why. The column is already exist. I just want to change/modify it as
(another) primary key.
Should I do create dummy column --> copy the contents --> drop the column
--> create the new one --> copy from dummy?
The replication runs in continues mode. Will it stops immediately when I do
these changes? What should I do next?
TIA
Echo
btw do you have merge replication book? how can I get it? thanks )
"Hilary Cotter" wrote:

> use sp_repladdcolumn for this. When I hear the term composite keys I think
> a primary key consisting of more than one column. Replication normally
> complains when you change a PK.
> "echo" <echo@.discussions.microsoft.com> wrote in message
> news:462ECC14-6DF7-4D12-9B46-3744B388B563@.microsoft.com...
> (composite
>
>

No comments:

Post a Comment