Stored Procedure Resolver Error On Merge Replication

I'm running a Stored Procedure and I get this error:

The Stored Procedure Resolver encountered the following error executing the stored procedure 'dbo.test_Resolver_Conflict'. Explicit value must be specified for identity column in table 'myTable' either when IDENTITY_INSERT is set to ON or when a replication user is inserting into a NOT FOR REPLICATION identity column.

When I change a value on the same column in Publisher and Subscriber and then run the Replication Job, I want to duplicate the ROW with a Stored Procedure Resolver. It runs this query:

INSERT INTO myTable (name, value) 
SELECT name , value 
FROM myTable 
WHERE rowguid = @rowguid

myTable Creation:

CREATE TABLE myTable( 
id identity 
, name varchar 
, value int 
) 

Merge Replication creates rowguid automaticaly.

May 20th, 2015 5:30pm

You have the following options:

  • Make a column list (a SELECT on INFORMATION_SCHEMA.COLUMNS and a good text editor or the solutions proposed by Andomar and Dave can help you with this)

OR

  • make the identity column in myTable a regular (non-identity) int column (since it's an archive table, why do you need an identity column?).

Refer 

http://stackoverflow.com/questions/2005437/an-explicit-value-for-the-identity-column-in-table-can-only-be-specified-when-a

Free Windows Admin Tool Kit Click here and download it now
May 20th, 2015 8:30pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics