none
Transactional Replication - Error

    Question

  • Pub,sub & distr in same server : ServerA

    Database :  DB1   (pub)

    Database : DB2     (sub)

    publication name: firstPub   (contains 50 articales)


    Type:  transactional replication

    but only one article (product_details) failed while insert record in pub.


    Error messages:
    Procedure or function sp_MSins_dboproduct_details has too many arguments specified. (Source: MSSQLServer, Error number: 8144)
    Get help: http://help/8144

    Monday, October 15, 2018 1:24 PM

All replies

  • Did you do a schema change recently and are you using custom replication stored procedures?

    If not, your best fix is to drop the table from the subscription and then add is back.

     
    sp_dropsubscription @publication=  'publication' ,  @article= 'TableName' ,  @subscriber= 'subscriber', @destination_db= 'destination_db'  
    GO
    sp_addsubscription  @publication = 'publication', @article='TableName', @subscriber = 'subscriber',  @destination_db = 'destination_db', 
     @subscription_type = N'push';
    
        

    You will need to disable immediate sycn for this.

    • Proposed as answer by Mohsin_A_Khan Monday, October 15, 2018 9:37 PM
    Monday, October 15, 2018 1:36 PM
    Moderator
  • schema changes in pub or sub ? 

    error mean : mismatch  the pub & sub article number of columns? right?

    Tuesday, October 16, 2018 3:46 AM
  • Hi KIRUBAKARAN J A,

    The error means you're passing too many parameters into the stored procedure. It indicates a mismatch in the number of parameters (columns) in the command stored in the Distribution DB compared to the number of columns in the Replication created stored procedure. But you can compare the SCHEMA of the Published database to the Subscriber first by executing sp_help on both the pub & sub. If it shows that they're both the same, please try to use the sp_scriptpublicationcustomprocs procedure on the publisher to generate the replication procs and recreate them on the subscriber.

    Here is a similar scenario.
    Replication: Procedure or function % has too many arguments specified

    Best Regards
    Puzzle
    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Tuesday, October 16, 2018 8:11 AM
  • is this error also same? 

    Procedure or function 'sp_MSins_dboproduct_details' expects parameter '@c12', which was not supplied. (Source: MSSQLServer, Error number: 201)
    Get help: http://help/201

    both of my DB compatibility is 130

    got fixed, after reinitialize subscription.
    Wednesday, October 17, 2018 5:11 AM
  • Hi KIRUBAKARAN J A,

    This is not the same error. This error occurs when executing a stored procedure that expects a parameter that was not supplied and the parameter does not have a default value specified during creation. 

    ‘sp_MSins_< tablename >’ is the stored procedure to handle inserts. Depending on how you configured replication, a different type of syntax will be used to replicate inserts. You can use the same way to find the insert command, then try to see if the stored procedure in the subscriber end matches with the parameters.

    Did you make schema changes to the replicated database?  If so, you may reinitialize the subscription to resolve the issue. Please refer to the documents from Make Schema Changes on Publication Databases.

    Best Regards
    Puzzle
    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Wednesday, October 17, 2018 5:53 AM
  • Pub,sub & distr in same server : ServerA

    Database :  DB1   (pub)

    Database : DB2     (sub)

    publication name: firstPub   (contains 50 articales)

    there is one more publication: secndpub (1 article) / which is contains article name product_details thats also in firstPub.

    but in secndpub product_details is replicated to product_details_lite as subscri article & also very few column only configured for replications.

    but missed to configure insert/update/delete Proced name.   so it get  default name like 

    [sp_MSins_dboproduct_details][sp_MSupd_dboproduct_details][sp_MSdel_dboproduct_details]

    now i configured secndpub  procedure & reinitialize this sub

    [sp_MSins_dboproduct_details_lite][sp_MSupd_dboproduct_details_lite][sp_MSdel_dboproduct_details_lite]

    hope this solution will work?


    Wednesday, October 17, 2018 6:13 AM
  • Hi KIRUBAKARAN J A,

    If it works, please let us know.


    Best Regards
    Puzzle
    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Wednesday, October 17, 2018 6:40 AM
  • am asking / suggestion , is this works? 
    Wednesday, October 17, 2018 10:19 AM
  • I have not tested this situation. But it should work. If you meet new issue, please tell me.

    Best Regards
    Puzzle
    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Thursday, October 18, 2018 6:26 AM