範例:同步化及紀元編號矩陣

本主題中的範例說明當抄本建立和同步化發生時,紀元編號矩陣在不同網站上如何變更。
  1. 第一次在 boston_hub 啟用抄寫之前,其紀元編號矩陣是空的:
    multitool lsepoch 
    For VOB replica "/vobs/dev":
    Oplog IDs for row "original" (@ minuteman):
         original=0
  2. 當管理者使用 mkreplica –export 建立新抄本 (sanfran_hub) 之後,boston_hub 的紀元編號矩陣會包含 sanfran_hub 的列 (另請注意,管理者已將抄本 original 重新命名為 boston_hub):
    For VOB replica "/vobs/dev":
    Oplog IDs for row "boston_hub" (@ minuteman):
            sanfran_hub=0
         original=1
    Oplog IDs for row "sanfran_hub" (@ goldengate):
         original=0
             sanfran_hub=0
  3. 當 sanfran_hub 抄本的管理者匯入抄本建立封包之後,sanfran_hub 的紀元編號矩陣如下所示:
    multitool lsepoch 
    For VOB replica "/vobs/dev":
    Oplog IDs for row "boston_hub" (@ minuteman):
         original=1
            sanfran_hub=0
    Oplog IDs for row "sanfran_hub" (@ goldengate):
         original=1
             sanfran_hub=1
  4. 當兩個抄本上進行開發工作時,每一個抄本本身狀態的記錄會隨之更新。不過,因為不發生同步化,所以每一個抄本對其他抄本之狀態的預估不變。
    在 boston_hub:
    multitool lsepoch 
    For VOB replica "/vobs/dev":
    Oplog IDs for row "boston_hub" (@ minuteman):
            sanfran_hub=0
         original=9
    Oplog IDs for row "sanfran_hub" (@ goldengate):
         original=0
             sanfran_hub=0
    在 sanfran_hub:
    multitool lsepoch 
    For VOB replica "/vobs/dev":
    Oplog IDs for row "boston_hub" (@ minuteman):
         original=1
            sanfran_hub=0
    Oplog IDs for row "sanfran_hub" (@ goldengate):
         original=1
             sanfran_hub=4
  5. 在 boston_hub 的管理者輸入 syncreplica –export 指令來產生 sanfran_hub 的更新封包。
    sanfran_hub 列會更新,以顯示在 boston_hub 發生的所有作業將套用至 sanfran_hub 抄本:
    multitool lsepoch 
    For VOB replica "/vobs/dev":
    Oplog IDs for row "boston_hub" (@ minuteman):
            sanfran_hub=0
         boston_hub=10
    Oplog IDs for row "sanfran_hub" (@ goldengate):
         boston_hub=10
             sanfran_hub=0
  6. 在 sanfran_hub,管理者會套用更新封包。現在 sanfran_hub 的紀元編號矩陣將反映在 boston_hub 抄本所做的變更:
    multitool lsepoch 
    For VOB replica "/vobs/dev":
    Oplog IDs for row "boston_hub" (@ minuteman):
         boston_hub=10
            sanfran_hub=0
    Oplog IDs for row "sanfran_hub" (@ goldengate):
         boston_hub=10
            sanfran_hub=4

範例:同步化及紀元編號矩陣

下列範例說明當抄本建立和同步化發生時,紀元編號矩陣在不同抄本上如何變更。
  1. 在啟動之後,及第一次在 boston_hub 啟用抄寫之前,其紀元編號矩陣是空的:

    multiutil lsepoch -clan telecomm -site boston_hub -family PRODA -user lexadmin -password secret

    Multiutil: Estimates of the epochs from each site replayed at each site ‘boston_hub’ (@host1):

    boston_hub: 0

  2. 當 sanfran_hub 抄本的管理者匯入抄本建立封包之後,sanfran_hub 的紀元編號矩陣如下所示:

    multiutil lsepoch -clan telecomm -site sanfran_hub -family PRODA -user sfadmin -password secret

    Multiutil: Estimates of the epochs from each site replayed at each site ‘SANFRAN_HUB’ (@host2):

    boston_hub: 2

    SANFRAN_HUB:0

    註: sanfran_hub 本身的預估是 0。在此範例中,sanfran_hub 也預估兩個資料庫作業發生在 boston_hub。從建立新記錄到建立抄本,都是這些作業的範圍。
  3. 當兩個抄本上進行開發工作時,每一個抄本本身狀態的記錄會隨之更新。不過,因為不發生同步化,所以每一個抄本對其他抄本之狀態的預估不變。

    在 boston_hub:

    multiutil lsepoch -clan telecomm -site boston_hub -user lexadmin -password secret boston_hub

    Multiutil: Estimates of the epochs from each site replayed at each site ‘boston_hub’ (@host1):

    boston_hub: 12

    SANFRAN_HUB:0

    在 sanfran_hub:

    multiutil lsepoch -clan telecomm -site sanfran_hub -user sfadmin -password secret

    Multiutil: Estimates of the epochs from each site replayed at each site ‘SANFRAN_HUB’ (@host2):

    boston_hub: 2

    SANFRAN_HUB:7

  4. 在 boston_hub 的管理者輸入 syncreplica –export 指令來產生 sanfran_hub 的更新封包。
  5. 在 boston_hub,sanfran_hub 列會更新,以顯示在 boston_hub 發生的所有作業已傳送至 sanfran_hub 抄本:

    multiutil lsepoch -clan telecomm -site boston_hub -user lexadmin -password secret sanfran_hub

    Multiutil: Estimates of the epochs from each site replayed at each site ‘SANFRAN_HUB’ (@host1):

    boston_hub: 12

    SANFRAN_HUB:0

  6. 在 sanfran_hub,管理者會匯入更新封包。現在 sanfran_hub 的紀元編號矩陣將反映在 boston_hub 抄本所做的變更:

    multiutil lsepoch -clan telecomm -site sanfran_hub -user sfadmin -password secret sanfran_hub

    Multiutil: Estimates of the epochs from each site replayed at each site ‘SANFRAN_HUB’ (@host1):

    boston_hub: 12

    SANFRAN_HUB:7


意見