[Synchronous replication common error handling 3] The Stored Procedure sp_MSins_tablename cannot be found, and the stored procedure cannot be found
An error occurred while synchronizing the environment to SQL2008 R2
The error message is that the synchronization stored procedure called during synchronization is not found at the subscription end. The MS error message is as follows:
When a transaction is published in SQL SERVER automatic synchronization settings, select the subscription SERVER to insert, update, and delete data stored in each table. Scripts that contain these stored procedures are created by the snapshot agent and applied to the distribution agent of the subscription server during the initial synchronization. If you manually synchronize and subscribe to these buckets, they are not created and must be created manually. In this case (manual synchronization), if the subscription server does not have a stored procedure, the distribution job inserts the following error message: the Stored Procedure sp_MSins_tablename cannot be found.
The error image is as follows:
Some objects of the same DB object are OK, and some can generate the interfaces that have been stored synchronously. The following settings are invalid:
Solution:
1. Execute the following script on the publisher-data release page.
USE [Publish database] GOEXEC sp_scriptpublicationcustomprocs 'Publish name'
-- View objects not stored in synchronization
USE DBNameGOSELECT DISTINCT OBJECT_NAME (ID) FROM sys. sysdepends WHERE depid = OBJECT_ID ('table name') AND OBJECT_NAME (ID) LIKE 'SP [_] %'
2. Generate a synchronization Stored Procedure script. Find the script that does not generate a synchronization storage copy and run it on the subscription end.
Microsoft official website Introduction: Click to open the link