I've an almost identical schema on the subscriber, same columns but sometimes different order (that happened because of different evolution of databases).
Everything would be OK if INSERTS
generated by replication had explicit column aliases.
But seems like they don't ( I can't trace them in SQL Server profiler directly).
I found a similar topic asked here: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/1ba39953-4bf5-4a64-8803-cd52af7fb29a/transactional-replication-snapshot-when-column-order-does-not-match-on-target?forum=sqlreplication , unanswered.
Error message I get is Data conversion failed
. I tried bringing both tables to identical column order and it fixes the problem, unfortunately I can't do this for all databases.
Thanks.
EDIT: I used @status = 8
parameter value in sp_addarticle procedure, which should make SQL Server
Includes the column name in INSERT statements.
didn't help.