强制执行完整数据库复制
当数据库的副本不同步时,可以使用 Replicate 命令和 -F 选项来强制执行完整数据库复制。进行复制时,还允许用户在完整复制期间继续查看复制更新。
关于此任务
此方法是清除数据库复制历史记录的替代方法。对于大型数据库,清除复制历史记录以强制执行完整复制可能会花费一些时间,并且会延迟复制新更新,直至完成完整复制为止。例如,如果您清除邮件文件的复制历史记录,则在完成完整复制之前,用户可能看不到新邮件。
过程
要强制执行完整复制,请使用以下服务器命令:
Replicate <server> <database> -F
如果使用 -F 选项但没有实际执行复制,则使用 -L 选项记录有关将要复制的文档(注释)的详细信息。例如:
Replicate Mail\Renovations mail/sdaryn.nsf -L
显示类似于以下内容的输出。>>> 表示此文档的描述未在输出中显示。
[4894:0002-0748] NoteRepl: CN=Mail\O=Renovations!!mail/sdaryn.nsf to mail/sdaryn.nsf Since 07/27/2018 08:25:22 AM
>>>Replicating from remote replica (sdaryn) to local replica (pull). Since=The replication history from last pull
[4894:0002-0748] 07/27/2018 08:28:57 AM Starting replication with server Mail\Renovations
[4894:0002-0748] 07/27/2018 08:28:57 AM Pulling mail\sdaryn.nsf from Mail\Renovations mail/sdaryn.nsf
[4894:0002-0748] NoteRepl: UNID 7235FD43:BB0874BA:852582A2:0052CF6C Cls 1
>>> UNID and Cls=NoteClass
[4894:0002-0748] Src: NID A96 SN 2 ST 07/27/2018 08:15:07 AM Mod: 07/27/2018 08:15:07 AM
>>> Source note info (in this case the source is the remote replica), NID=NoteID, SN=Sequence number, ST=Sequence time, Mod=Modified time
[4894:0002-0748] Dest: NID 0 SN 0 ST Did not repl
>>> Destination note info. "Did not repl" means that it should have replicated in the past, but the note is missing from the destination (local) replica.
[4894:0002-0748] NoteRepl: mail/sdaryn.nsf to CN=Mail\O=Renovations!!mail/sdaryn.nsf Since 07/27/2018 08:25:23 AM
>>> Replicating from local to remote. Since=Replication history from last push
[4894:0002-0748] 07/27/2018 08:28:57 AM Pushing mail/sdaryn.nsf to Mail\Renovations mail/sdaryn.nsf
[4894:0002-0748] NoteRepl: UNID 29BD9D7B:04808407:852582A2:0052CF6E Cls 1
[4894:0002-0748] Src: NID A9E SN 2 ST 07/27/2018 08:28:43 AM Mod: 07/27/2018 08:28:43 AM
[4894:0002-0748] Dest: NID A9E SN 1 ST 06/04/2018 11:04:35 AM Waiting to repl
>>> "Waiting to repl" means that this note will replicate the next time the databases replicate. Nothing wrong here.
[4894:0002-0748] 07/27/2018 08:28:57 AM Finished replication with server Mail\Renovations
[4894:0002-0748] 07/27/2018 08:28:57 AM Database Replicator shutdown