MSSQL 2012 合并复制心得

合并复制的基本操作我在这里就不多说了, 很多地方都能找到。

以下是几点是这几天研究同的经验。

1. 合并复制如果加了筛选条件时是不允许双向的, 数据只能从发布同步到订阅, 如果你在订阅端插入数据会出错。

2. 错误

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"."Complaint"'. (Source: MSSQL_REPL, Error number: MSSQL_REPL20037)
Get help: http://help/MSSQL_REPL20037
Field size too large (Source: MSSQLServer, Error number: 0)
Get help: http://help/0
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 "mpnet"."dbo"."Complaint" in "E:\RepData\unc\myserver\20100407171022\Complaint_17.bcp" -e "errorfile" -t"\n<x$3>\n" -r"\n<,@g>\n" -m10000 -Smysubserver\MP -T -w (Source: MSSQLServer, Error number: 20253)
Get help: http://help/20253

是因为在varchar/char/text 中(ASCII)存有特殊字符,当代理要产生BCP文件时会出错 ,需要改为nvarchar/nchar/ntext  (unicode)

3. 对于大表时可以采用手动

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值