Insert Error: Column name or number of supplied values does not match table definition.

  • HELP! This weird error is very hard to track down! I am doing replication from a sql2005 sp2a x64 to another sql2005 sp2a x64 machine. This is a transaction processes moving the stored procedures to the other server. The Tables and views are each replicated separately the same way. The stored procedures process keeps throwing an error on the subscriber side of the process. The only problem with the following messages is the developer and I cannot track down where the @@trancount is coming from. It is not in any of his stored procedures. I scripted out the entire database and did a search on the word trancount and came up with nothing! Any one have any ideas on where I can track this down?

    Insert Error: Column name or number of supplied values does not match table definition.  

    Follwed up by the detail :

    Command attempted:

    if @@trancount > 0 rollback tran

    (Transaction sequence number: 0x0000F7D30001BC30000100000000, Command ID: 1)

     

     

  • Lowry

    Don't know.  Are there any triggers defined on the subscriber?

    John

  • I have had this error before and it stemmed from schema differences between the publisher and subscriber.

    When I received the error there would be an error hidden the the transaction history with the table that it was addressing.  and usually a command similar to failure to execute sp_msins(tablename) what I found was that the sp_msins stored procedure which is what is called by the distribution agent on the distributor (proc actually exists in the subscriber database) does not have a insert command with the correct number of values.  3 possible solutions.  1.  Modify the proc called by the distribution agent.  2.  Modify the table to have default values in the missing columns. 3.  recreate the entire subscriber or just the procs. by running 'sp_scriptpublicationcustomprocs'  on the publisher.

  • There are no triggers on the database.

    We cannot identify any stored procedure causing the problem. I did try deleting the subscription, the publication. Removing the stored procedures on the replicated database and restarting from the beginning also. Still getting the error. The process described in the error message from the system is non-existant in the stored procedures.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply