Monday, March 26, 2012

insert, delete, update stored procedures in Snapshot

Just a general question ....
When the initial snapshot for a replication runs, I see it creates a
bunch of sp_MSins, sp_MSdel, and sp_MSupd, 3 stored procedures for
each of the articles in my publication.
I see these sp's at the subscriber db, but what I do not understand is
why I see 2 stored procedures that are identical, one named with
bracquets, the other without bracquets, e.g. [sp_MSupd_Entity Address]
and sp_MSupd_Entity Address ?
My current replication fails because it tries to run sp_MSupd_Entity
Address that apparently never gets created. But [sp_MSupd_Entity
Address] is created.
how can I tell the replication to use [sp_MSupd_Entity Address] not
sp_MSupd_Entity Address ??
Having SQL Server create two sets of replication stored procedures is an error.
SQL Server will by default autogenerate stored procedures in the unbracketed form, ie sp_MSupd_Entity Address.
It looks like the space is in the table name is causing this problem, but I am unable to reproduce your problem on SQL 2000 sp3 8.000.818. What version are you running.
Do a sp_browsereplcmds in your distribution database to see what procs SQL Server is using.
To answer your question, if you need to change the proc name that SQL Server is using right click on your publication, click on the articles tab, click on the browse button to the right of your table name, click on commands tab, and make the changes there

No comments:

Post a Comment