Why in some of the MS generated procs is there a secondary create proc statement I believe it has something to do with primary and foreign keys but it is not consistent accross all tables that have primary keys. I have included the code of one of the procs.
create procedure "sp_MSins_AH_MEMBER_ALERTS" @c1 bigint,@c2 smallint,@c3 bigint,@c4 int,@c5 datetime,@c6 datetime,@c7 bit,@c8 uniqueidentifier
AS
BEGIN
insert into "AH_MEMBER_ALERTS"(
"id", "company", "account", "alert_id", "start_date", "end_date", "clipboard", "rowguid"
)
values (
@c1, @c2, @c3, @c4, @c5, @c6, @c7, @c8
)
END
GO
create procedure "sp_MSins_AH_MEMBER_ALERTS";2 @c1 bigint,@c2 smallint,@c3 bigint,@c4 int,@c5 datetime,@c6 datetime,@c7 bit,@c8 uniqueidentifier
as
if exists ( select * from "AH_MEMBER_ALERTS"
where "id" = @c1
)
begin
update "AH_MEMBER_ALERTS" set "company" = @c2,"account" = @c3,"alert_id" = @c4,"start_date" = @c5,"end_date" = @c6,"clipboard" = @c7,"rowguid" = @c8
where "id" = @c1
end
else
begin
insert into "AH_MEMBER_ALERTS" ( "id","company","account","alert_id","start_date","end_date","clipboard","rowguid" ) values ( @c1,@c2,@c3,@c4,@c5,@c6,@c7,@c8 )
end

Transactional Replication sp question
carb
For the article 'AH_MEMBER_ALERTS', what value did you specify for sp_addarticle parameter @pre_creation_cmd
It looks like the 2nd proc should be the correct one, but most likely didn't drop the first one because you might have specified to not drop existing object. Can you confirm
June Low
This is an MS created procedure why would it matter To answer your question it is set to @pre_creation_cmd = N'drop'.
Josh
KimballJohnson
Paul Baudouin
Meher123
jh55557777