I've setup a transactional replication and allowed initialize from backup due to bandwidth restraints (so no snapshots generated). Now we get this error on the Publication database, when the application that inserts data in the database is started (well, it runs for a short time, then it stops with the error). The replication monitor shows no errors, so it's not an inconsistency between publication and subscription database. Nor is it a concern about autogenerated IDs (i.e. using an Identity column), as this table relies on datestamp as PK. The error is:
System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint ''. Cannot insert duplicate key in object 'dbo.'. The statement has been terminated.
Can the replication setup have done something to the source/publication database causing this? Can this be caused by a high latency to the subscriber database? As I don't see errors in the replication monitor, I'm not even certain that this error occured in continuation of the replication setup.
How do I troubleshoot this?