我已经设置了合并复制. Server DUCKDUCK1-1是分销商和出版商.服务器DUCKDUCK-2是订户.
我只复制了一个小表(这是一个测试).
该表正在被复制(但在订户上它是空的).
Error messages: You do not have permission to run 'SP_TRACE_GENERATEEVENT'. (Source: MSsqlServer,Error number: 8189) Get help: http://help/8189 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
详细日志说明如下:
2018-05-18 14:41:34.856 Microsoft sql Server Merge Agent 11.0.5058.0 2018-05-18 14:41:34.866 Copyright (c) 2008 Microsoft Corporation 2018-05-18 14:41:34.870 Microsoft sql Server Replication Agent: replmerg 2018-05-18 14:41:34.874 2018-05-18 14:41:34.877 The timestamps prepended to the output lines are expressed in terms of UTC time. 2018-05-18 14:41:34.879 User-specified agent parameter values: -Publisher DUCKDUCK-1-1 -PublisherDB mydatabase -Publication Replication2018 -Subscriber DUCKDUCK-2 -SubscriberDB mydatabase -Distributor DUCKDUCK-1-1 -DistributorSecurityMode 1 -Continuous -OutputVerboseLevel 2 -Output \\DUCKDUCK-1-1\snapshot_replicacion\salida.txt -XJOBID 0x307666C42266374F956FDBF68CA326E6 -XJOBNAME DUCKDUCK-1-1-mydatabase-Replication2018-DUCKDUCK-2-1 -XSTEPID 2 -XSUBSYSTEM Merge -XSERVER DUCKDUCK-1-1 -XCMDLINE 0 -XCancelEventHandle 0000058C -XParentProcessHandle 00000614 2018-05-18 14:41:34.922 Percent Complete: 0 2018-05-18 14:41:34.926 Connecting to Distributor 'DUCKDUCK-1-1' 2018-05-18 14:41:34.929 Connecting to OLE DB Distributor at datasource: 'DUCKDUCK-1-1',location: '',catalog: '',providerstring: '' using provider 'sqlNCLI11' 2018-05-18 14:41:34.965 OLE DB Distributor: DUCKDUCK-1-1 DBMS: Microsoft sql Server Version: 11.00.5058 catalog name: user name: dbo API conformance: 0 sql conformance: 0 transaction capable: 1 read only: F identifier quote char: " non_nullable_columns: 0 owner usage: 15 max table name len: 128 max column name len: 128 need long data len: max columns in table: 1000 max columns in index: 16 max char literal len: 131072 max statement len: 131072 max row size: 131072 2018-05-18 14:41:34.969 OLE DB Distributor 'DUCKDUCK-1-1': select SERVERPROPERTY ('ProductVersion') 2018-05-18 14:41:34.972 OLE DB Distributor 'DUCKDUCK-1-1': {call sp_helpdistpublisher (N'DUCKDUCK-1-1') } 2018-05-18 14:41:34.977 OLE DB Distributor 'DUCKDUCK-1-1': {call sp_MShelp_repl_agent (N'DUCKDUCK-1-1',N'mydatabase',N'Replication2018',N'DUCKDUCK-2',1)} 2018-05-18 14:41:34.983 OLE DB Distributor 'DUCKDUCK-1-1': select datasource,srvid from master..sysservers where upper(srvname) = upper(N'DUCKDUCK-1-1') 2018-05-18 14:41:34.987 OLE DB Distributor 'DUCKDUCK-1-1': {call sp_MShelp_merge_agentid (0,null,90,N'DUCKDUCK-2')} 2018-05-18 14:41:34.992 OLE DB Distributor 'DUCKDUCK-1-1': {call sp_MShelp_profile (1,4,N'')} 2018-05-18 14:41:34.995 OLE DB Distributor 'DUCKDUCK-1-1': {call sys.sp_get_redirected_publisher(N'DUCKDUCK-1-1',0)} 2018-05-18 14:41:34.999 Percent Complete: 0 2018-05-18 14:41:34.999 Connecting to OLE DB Publisher at datasource: 'DUCKDUCK-1-1',catalog: 'mydatabase',providerstring: '' using provider 'sqlNCLI11' 2018-05-18 14:41:35.002 Initializing 2018-05-18 14:41:35.008 OLE DB Distributor 'DUCKDUCK-1-1': {call sys.sp_MSadd_merge_history90 (?,?,?)} 2018-05-18 14:41:35.010 OLE DB Publisher: DUCKDUCK-1-1 DBMS: Microsoft sql Server Version: 11.00.5058 catalog name: mydatabase user name: dbo API conformance: 0 sql conformance: 0 transaction capable: 1 read only: F identifier quote char: " non_nullable_columns: 0 owner usage: 15 max table name len: 128 max column name len: 128 need long data len: max columns in table: 1000 max columns in index: 16 max char literal len: 131072 max statement len: 131072 max row size: 131072 2018-05-18 14:41:35.014 Percent Complete: 0 2018-05-18 14:41:35.014 OLE DB Publisher 'DUCKDUCK-1-1': set nocount on declare @dbname sysname select @dbname = db_name() declare @collation nvarchar(255) select @collation = convert(nvarchar(255),databasepropertyex(@dbname,N'COLLATION')) select collationproperty(@collation,N'CODEPAGE') as 'CodePage',collationproperty(@collation,N'LCID') as 'LCID',N'COMPARISONSTYLE') as 'ComparisonStyle',cast(case when convert (int,databasepropertyex (@dbname,'comparisonstyle')) & 0x1 = 0x1 then 0 else 1 end as bit) as DB_CaseSensitive,serverproperty ('comparisonstyle')) & 0x1 = 0x1 then 0 else 1 end as bit) as Server_CaseSensitive set nocount off 2018-05-18 14:41:35.017 Validating publisher 2018-05-18 14:41:35.021 OLE DB Publisher 'DUCKDUCK-1-1': select SERVERPROPERTY ('ProductVersion') 2018-05-18 14:41:35.024 OLE DB Distributor 'DUCKDUCK-1-1': {call sys.sp_MSadd_merge_history90 (?,?)} 2018-05-18 14:41:35.028 Connecting to OLE DB Publisher at datasource: 'DUCKDUCK-1-1',providerstring: '' using provider 'sqlNCLI11' 2018-05-18 14:41:35.031 Percent Complete: 0 2018-05-18 14:41:35.034 Connecting to Publisher 'DUCKDUCK-1-1' 2018-05-18 14:41:35.036 OLE DB Publisher: DUCKDUCK-1-1 DBMS: Microsoft sql Server Version: 11.00.5058 catalog name: mydatabase user name: dbo API conformance: 0 sql conformance: 0 transaction capable: 1 read only: F identifier quote char: " non_nullable_columns: 0 owner usage: 15 max table name len: 128 max column name len: 128 need long data len: max columns in table: 1000 max columns in index: 16 max char literal len: 131072 max statement len: 131072 max row size: 131072 2018-05-18 14:41:35.037 OLE DB Distributor 'DUCKDUCK-1-1': {call sys.sp_MSadd_merge_history90 (?,?)} 2018-05-18 14:41:35.051 OLE DB Distributor 'DUCKDUCK-1-1': {call sp_MShelp_repl_agent (N'DUCKDUCK-1-1',1)} 2018-05-18 14:41:35.055 Connecting to OLE DB Subscriber at datasource: 'DUCKDUCK-2',providerstring: '' using provider 'sqlNCLI11' 2018-05-18 14:41:35.072 OLE DB Subscriber: DUCKDUCK-2 DBMS: Microsoft sql Server Version: 11.00.6020 catalog name: mydatabase user name: clientes API conformance: 0 sql conformance: 0 transaction capable: 1 read only: F identifier quote char: " non_nullable_columns: 0 owner usage: 15 max table name len: 128 max column name len: 128 need long data len: max columns in table: 1000 max columns in index: 16 max char literal len: 131072 max statement len: 131072 max row size: 131072 2018-05-18 14:41:35.077 OLE DB Subscriber 'DUCKDUCK-2': select SERVERPROPERTY ('ProductVersion') 2018-05-18 14:41:35.081 OLE DB Subscriber 'DUCKDUCK-2': set nocount on declare @dbname sysname select @dbname = db_name() declare @collation nvarchar(255) select @collation = convert(nvarchar(255),serverproperty ('comparisonstyle')) & 0x1 = 0x1 then 0 else 1 end as bit) as Server_CaseSensitive set nocount off 2018-05-18 14:41:35.085 Percent Complete: 0 2018-05-18 14:41:35.085 OLE DB Subscriber 'DUCKDUCK-2': {call sys.sp_MSadd_merge_history90 (?,?)} 2018-05-18 14:41:35.088 Connecting to Subscriber 'DUCKDUCK-2' 2018-05-18 14:41:35.093 OLE DB Distributor 'DUCKDUCK-1-1': {call sys.sp_MSadd_merge_history90 (?,?)} 2018-05-18 14:41:35.094 OLE DB Subscriber 'DUCKDUCK-2': {call sys.sp_MSadd_merge_history90 (?,?)} 2018-05-18 14:41:35.099 Percent Complete: 0 2018-05-18 14:41:35.102 Retrieving publication information 2018-05-18 14:41:35.104 OLE DB Distributor 'DUCKDUCK-1-1': {call sys.sp_MSadd_merge_history90 (?,?)} 2018-05-18 14:41:35.110 Percent Complete: 0 2018-05-18 14:41:35.113 Retrieving subscription information. 2018-05-18 14:41:35.114 OLE DB Subscriber 'DUCKDUCK-2': {call sys.sp_MSadd_merge_history90 (?,?)} 2018-05-18 14:41:35.115 OLE DB Distributor 'DUCKDUCK-1-1': {call sys.sp_MSadd_merge_history90 (?,?)} 2018-05-18 14:41:35.123 Percent Complete: 0 2018-05-18 14:41:35.127 Applying the snapshot to the Subscriber 2018-05-18 14:41:35.129 OLE DB Distributor 'DUCKDUCK-1-1': {call sys.sp_MSadd_merge_history90 (?,?)} 2018-05-18 14:41:35.190 OLE DB Distributor 'DUCKDUCK-1-1': select datasource,srvid from master..sysservers where upper(srvname) = upper(N'DUCKDUCK-1-1') 2018-05-18 14:41:35.193 OLE DB Distributor 'DUCKDUCK-1-1': {call sys.sp_MSadd_mergesubentry_indistdb (0,N'DUCKDUCK-1-1',1,N'',90)} 2018-05-18 14:41:35.201 Connecting to OLE DB Subscriber at datasource: 'DUCKDUCK-2',providerstring: '' using provider 'sqlNCLI11' 2018-05-18 14:41:35.209 OLE DB Subscriber: DUCKDUCK-2 DBMS: Microsoft sql Server Version: 11.00.6020 catalog name: mydatabase user name: clientes API conformance: 0 sql conformance: 0 transaction capable: 1 read only: F identifier quote char: " non_nullable_columns: 0 owner usage: 15 max table name len: 128 max column name len: 128 need long data len: max columns in table: 1000 max columns in index: 16 max char literal len: 131072 max statement len: 131072 max row size: 131072 2018-05-18 14:41:35.213 OLE DB Subscriber: DUCKDUCK-2 DBMS: Microsoft sql Server Version: 11.00.6020 catalog name: mydatabase user name: clientes API conformance: 0 sql conformance: 0 transaction capable: 1 read only: F identifier quote char: " non_nullable_columns: 0 owner usage: 15 max table name len: 128 max column name len: 128 need long data len: max columns in table: 1000 max columns in index: 16 max char literal len: 131072 max statement len: 131072 max row size: 131072 2018-05-18 14:41:35.220 OLE DB Subscriber 'DUCKDUCK-2': sp_MSacquiresnapshotdeliverysessionlock 2018-05-18 14:41:35.223 OLE DB Subscriber 'DUCKDUCK-2': sp_MStrypurgingoldsnapshotdeliveryprogress 2018-05-18 14:41:35.231 OLE DB Subscriber 'DUCKDUCK-2': sp_MSissnapshotitemapplied @snapshot_session_token = N'\\DUCKDUCK-1-1\snapshot_replicacion\unc\DUCKDUCK-1-1_mydatabase_Replication2018\20180518112431\',@snapshot_progress_token = N'\\DUCKDUCK-1-1\snapshot_replicacion\unc\DUCKDUCK-1-1_mydatabase_Replication2018\20180518112431\provincias_2.sch' 2018-05-18 14:41:35.235 OLE DB Subscriber 'DUCKDUCK-2': {call sys.sp_MSadd_merge_history90 (?,?)} 2018-05-18 14:41:35.252 [18%] OLE DB Subscriber 'DUCKDUCK-2': {call sys.sp_MSadd_merge_history90 (?,?)} Ƶ 騰Ā ꌸƵ硦燠ꍜƵὀ Ἷ 姸gꍜƵPercent Complete: 18 2018-05-18 14:41:35.258 Skipping file 'provincias_2.sch' because it has already been delivered for a prevIoUs article or by a prevIoUsly interrupted snapshot. 2018-05-18 14:41:35.261 OLE DB Distributor 'DUCKDUCK-1-1': {call sys.sp_MSadd_merge_history90 (?,?)} 2018-05-18 14:41:35.270 The merge process was unable to deliver the snapshot to the Subscriber. If using Web synchronization,restart the synchronization with verbose history logging and specify an output file to which to write.[18%] Ƶ 騰Ā ꌸƵ硦燠ꍜƵὀ Ἷ 姸gꍜƵPercent Complete: 18 2018-05-18 14:41:35.276 OLE DB Subscriber 'DUCKDUCK-2': {call sys.sp_MSadd_merge_history90 (?,?)} 2018-05-18 14:41:35.279 Preparing table 'provincias' for merge replication 2018-05-18 14:41:35.285 OLE DB Distributor 'DUCKDUCK-1-1': {call sys.sp_MSadd_merge_history90 (?,?)} 2018-05-18 14:41:35.292 Percent Complete: 18 2018-05-18 14:41:35.295 You do not have permission to run 'SP_TRACE_GENERATEEVENT'. 2018-05-18 14:41:35.297 OLE DB Distributor 'DUCKDUCK-1-1': {call sys.sp_MSadd_merge_history90 (?,?)} 2018-05-18 14:41:35.342 Percent Complete: 0 2018-05-18 14:41:35.345 Category:sqlSERVER Source: DUCKDUCK-2 Number: 8189 Message: You do not have permission to run 'SP_TRACE_GENERATEEVENT'. 2018-05-18 14:41:35.351 Percent Complete: 0 2018-05-18 14:41:35.354 Category:NULL Source: Merge Replication Provider Number: -2147201001 Message: The merge process was unable to deliver the snapshot to the Subscriber. If using Web synchronization,restart the synchronization with verbose history logging and specify an output file to which to write. 2018-05-18 14:41:35.357 Disconnecting from OLE DB Subscriber 'DUCKDUCK-2' 2018-05-18 14:41:35.360 Disconnecting from OLE DB Subscriber 'DUCKDUCK-2' 2018-05-18 14:41:35.363 Disconnecting from OLE DB Subscriber 'DUCKDUCK-2' 2018-05-18 14:41:35.365 Disconnecting from OLE DB Subscriber 'DUCKDUCK-2' 2018-05-18 14:41:35.368 Disconnecting from OLE DB Publisher 'DUCKDUCK-1-1' 2018-05-18 14:41:35.372 Disconnecting from OLE DB Publisher 'DUCKDUCK-1-1' 2018-05-18 14:41:35.375 Disconnecting from OLE DB Publisher 'DUCKDUCK-1-1' 2018-05-18 14:41:35.378 Disconnecting from OLE DB Publisher 'DUCKDUCK-1-1' 2018-05-18 14:41:35.380 Disconnecting from OLE DB Distributor 'DUCKDUCK-1-1' 2018-05-18 14:41:35.383 Disconnecting from OLE DB Distributor 'DUCKDUCK-1-1' 2018-05-18 14:41:35.386 The merge process will restart after waiting 30 second(s)...
无法弄清楚发生了什么.
解决方法
根据Microsoft文档:
COM object initialization Failed for an XML Subscriber. Some reasons why merge replication did not apply schema changes to the Subscriber include the following:
A failure to create a directory to write the temporary snapshot files.
A failure to enumerate schema articles.
For sql Server Compact Subscribers,a failure to reinitialize the
subscription.If the object is message based,a failure to write to the message
file.
您是否为sql Server分配了足够的内存并且是否有任何内容,例如事务日志或磁盘?
资料来源:https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2012/dd581610(v=sql.110)