強制完整資料庫抄寫

您可以搭配使用 抄寫 指令與 -F 選項,在資料庫的抄本失去同步時,強制完整資料庫抄寫。抄寫會在側邊發生,允許使用者在完整抄寫期間,繼續查看抄寫更新。

執行這項作業的原因和時機

這個方法是清除資料庫抄寫歷程的替代方案。對於大型資料庫,清除抄寫歷程以強制完整抄寫會耗費相當多時間,並且會延遲新更新的抄寫,直到它完成為止。比方說,如果您清除郵件檔的抄寫歷程,使用者在完整抄寫完成之前,可能無法看到新郵件。

程序

若要強制完整抄寫,請使用下列伺服器指令:
Replicate <server> <database> -F
如果您使用 -F 選項但是未實際執行抄寫,請使用 -L 選項,以記載要抄寫之文件 (notes) 的相關詳細資料。例如:
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