I'm trying to setup merge replication between two MS SQL Server 2012 databases on different hosts in one domain.
When replication is set up and first snapshot is generated replications starts. Replication monitor shows that tables are being prepared and bulk copied, but after about 40 minutes i get messages like
The process could not bulk copy into table "table_name".
...
The system cannot find the file specified.
The table is different every time. I'm trying to locate these missing files but they are absent. When i just sit and monitor these folders - i can see some folders being deleted a few moments before the error occurs. Tried both push and pull with similar results.
Answers on the web show it may be caused by
- User having insufficient privileges. I suppose this one is wrong because data is replicated till the error occurs - i can see tables being cleaned and filled with replicated data.
- Using local path for replication files. I'm using UNC path located on Publisher. Both publication and subscription occur with windows domain account with sufficient permissions.
Replication silently restarts and subscriber is constantly in inconsistent state.
Does anyone have any idea why this may happen or how can i debug the problem?