Sunday, March 25, 2012

Alter table with merge replication

Hello,
We are using sql2000.
1.Is there a better way to change field data type with
merge replication than add column, copy data and then drop
column?
2.How can i create index with merge replication?
3.If the only way is stop and restart the replication,
what is the easiest way to do so?
Many Many Thanks For Reply.>
> We are using sql2000.
> 1.Is there a better way to change field data type with
> merge replication than add column, copy data and then drop
> column?
--
No, there isn't. You use sp_repladdcolumn to add the new column and then
sp_repldropcolumn to remove the old column. Note that ALTER TABLE and ALTER
COLUMN does this transparently.
> 2.How can i create index with merge replication?
>
--
You use the @.schema_option argument of the sp_repladdcolumn to generate a
corresponding index. A value of 0x010 will generate a clustered index and
0x40 will generate a nonclustered index.
> 3.If the only way is stop and restart the replication,
> what is the easiest way to do so?
--
You don't need to break merge replication to perform make schema changes in
SQL Server 2000.
Hope this helps,
--
Eric Cárdenas
Senior support professional
This posting is provided "AS IS" with no warranties, and confers no rights.

No comments:

Post a Comment