April 12, 2019 at 9:54 am
Morning All,
I'm trying to Merge together Two Identical Schema Databases into a single DB. If we think of each Database as a separate shop that is setup identical and sells the same products. I need to merge two or more together into a single Database.
The first answer that's going to fly in is "Use SSIS". Well yes, but i'd like to use Replication.
Merge Replication seems to fit this purpose, but i simply cannot get it to work properly. I'll explain how i've set things and the error:
2. Merge Rep Selected - Single Table Added and Article Properties Changed Below
3. Enable Resolver
4. Success - publisher
5. Success Subscriber
6. Once both set up the same way as above this is how they appear. The GU_Merge works but PE_Merge fails
7. Failure Below
Full Error:
Error messages:
The merge process was unable to deliver the snapshot to the Subscriber. If using Web synchronization, the merge process may have been unable to create or write to the message file. When troubleshooting, restart the synchronization with verbose history logging and specify an output file to which to write. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147201001)
Get help: http://help/MSSQL_REPL-2147201001
The process could not bulk copy into table '"dbo"."FIR_Condition"'. (Source: MSSQL_REPL, Error number: MSSQL_REPL20037)
Get help: http://help/MSSQL_REPL20037
Batch send failed (Source: MSSQLServer, Error number: 0)
Get help: http://help/0
Cannot insert duplicate key row in object 'dbo.FIR_Condition' with unique index 'PK_Condition'. The duplicate key value is (1, 1). (Source: MSSQLServer, Error number: 2601)
Get help: http://help/2601
To obtain an error file with details on the errors encountered when initializing the subscribing table, execute the bcp command that appears below. Consult the BOL for more information on the bcp utility and its supported options. (Source: MSSQLServer, Error number: 20253)
Get help: http://help/20253
bcp "FIR_Merge"."dbo"."FIR_Condition" in "C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\ReplData\unc\BHVSQLC82_FIR_PE_PE_MERGE\20190412104612\FIR_Condition_2.bcp" -e "errorfile" -t"\n<x$3>\n" -r"\n<,@g>\n" -m10000 -Sbhvsqlc82 -T -w (Source: MSSQLServer, Error number: 20253)
Get help: http://help/20253
April 12, 2019 at 2:14 pm
My replication knowledge is OOOOLLLLLDDDD, like dinosaurs, so take anything else I say with a giant grain of salt.
The errors look like permissions issues. The error itself is saying that it can't move the files around, which implies networks, but I believe that one or more of the services in question don't have the access to the file shares that will make this work. At least, that's where I would start.
I'll see if I can't get some better help in here.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 15, 2019 at 10:36 am
Can you download and post the log?
I did a quick google and found some previous versions of SQL Server with a similar error & answers. Hopefully this will help:
Also, a quick question. Is there a business need to use replication for this? Or is it just your preference?
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply