Script to Script Out all Publication Stored Procs | SansSQL

Tuesday, March 18, 2008

Script to Script Out all Publication Stored Procs

You may come across a situation where in your replication is failing with the error “could not find the stored procedure ‘sp_MSupd_TableName’ ”
or
With the error “could not find the stored procedure ‘sp_MSins_TableName’ ”

To fix this replication errors run the following command in the publication database

sp_scriptpublicationcustomprocs ‘Publication Name’

After running the above stored proc, obtain the results from the result set and run them in the subscription database. Now restart the agent and this should fix the error.

Ads