Showing posts with label existing. Show all posts
Showing posts with label existing. Show all posts

Wednesday, March 28, 2012

Need to add merge article

SQL 2000 sp4 - I have an existing merge publication, I want a new table. I
assume I would do the following, however I have some questions:
I assume I call sp_addmergearticle, for the @.article param, specify the new
table.
I also assume I would need to call sp_addmergesubscription, correct?
I do the similar for transactional repl, however when I call
sp_addsubscription I can specify the new article in the @.article param, set
sync_type to automatic, run the snapshot agent and a snapshot is generated
for only the new article. My concern is I do not see an @.article param for
sp_addmergesubscription... When the snapshot agent fires, will it run for the
new article only?
Any insight would be appreciated.
Thanks,
Chris
Scratch this... all you need is sp_addmergearticle, unfortunately a snapshot
is generated for ALL articles (locking up my prod tables), however only the
added article is sent thru the merge agents...
Thanks anyway.
"Chris" wrote:

> SQL 2000 sp4 - I have an existing merge publication, I want a new table. I
> assume I would do the following, however I have some questions:
> I assume I call sp_addmergearticle, for the @.article param, specify the new
> table.
> I also assume I would need to call sp_addmergesubscription, correct?
> I do the similar for transactional repl, however when I call
> sp_addsubscription I can specify the new article in the @.article param, set
> sync_type to automatic, run the snapshot agent and a snapshot is generated
> for only the new article. My concern is I do not see an @.article param for
> sp_addmergesubscription... When the snapshot agent fires, will it run for the
> new article only?
> Any insight would be appreciated.
> Thanks,
> Chris
|||Besides sp_addmergesubscriptions, don't you also need to run a new snaphot?
Or does this get replicated on each subscriber?
David
"Chris" <Chris@.discussions.microsoft.com> wrote in message
news:E6D1BF6E-A6C5-4D21-BF5B-1529F71F18B5@.microsoft.com...
> SQL 2000 sp4 - I have an existing merge publication, I want a new table. I
> assume I would do the following, however I have some questions:
> I assume I call sp_addmergearticle, for the @.article param, specify the
> new
> table.
> I also assume I would need to call sp_addmergesubscription, correct?
> I do the similar for transactional repl, however when I call
> sp_addsubscription I can specify the new article in the @.article param,
> set
> sync_type to automatic, run the snapshot agent and a snapshot is generated
> for only the new article. My concern is I do not see an @.article param for
> sp_addmergesubscription... When the snapshot agent fires, will it run for
> the
> new article only?
> Any insight would be appreciated.
> Thanks,
> Chris

Need to add a new column to an existing table with 37M rows

I have been trying a couple of methods to add a column to a table. Well adding the column hasnt been that difficult. The difficult part is when I need to update this newly added column with a value returned from a function. Even 1000 rows takes for ever to update in a transaction. Is there any one who has come across this stituation, please help.

Thanks in Advance.

Quote:

Originally Posted by codezilla

I have been trying a couple of methods to add a column to a table. Well adding the column hasnt been that difficult. The difficult part is when I need to update this newly added column with a value returned from a function. Even 1000 rows takes for ever to update in a transaction. Is there any one who has come across this stituation, please help.

Thanks in Advance.


am not sure there are other ways...maybe you could benchmark your UPDATE vs SELECT ...newfield = udf(para) into ... from...

depending on table that your updating (may have triggers, constraint). the cons of SELECT...INTO is also space on your db.

also, try if you can just use a CALCULATED FIELD. another one is to just use a function outside of db, that is if you don't need to keep this field and will be used primarily for display purposes.