TheBugSlayer
Programmer
Please help me elucidate the below:
1.
Imagine you need to add a column to a table, but the table is replicated too: do you execute the normal ALTER TABLE statement and then SP_REPLADDCOLUMN to add the column to the table first then to the replication (article?), or does SP_REPLADDCOLUMN alone take care of both?
2.
In a situation where you also need to add a constraint to the column you just added, I don' t see how SP_REPLADDCOLUMN would add that constraint, which makes me lean towards executing both statements.
3.
According to BOL, SP_REPLADDCOLUMN "adds a column to an existing table article that has been published"...What is not clear to me is whether an article is the same table that is published- with a row in the SYSARTICLES system table, or whether it sits separately as another table.
Thanks for your help.
1.
Imagine you need to add a column to a table, but the table is replicated too: do you execute the normal ALTER TABLE statement and then SP_REPLADDCOLUMN to add the column to the table first then to the replication (article?), or does SP_REPLADDCOLUMN alone take care of both?
2.
In a situation where you also need to add a constraint to the column you just added, I don' t see how SP_REPLADDCOLUMN would add that constraint, which makes me lean towards executing both statements.
3.
According to BOL, SP_REPLADDCOLUMN "adds a column to an existing table article that has been published"...What is not clear to me is whether an article is the same table that is published- with a row in the SYSARTICLES system table, or whether it sits separately as another table.
Thanks for your help.