レプリケートされたデータベースの構成の表示
いくつかのツールで、レプリケートされたデータベースの構成を表示できます。
ttIsqlのrepschemesコマンドによる構成情報の表示
レプリケートされたデータベースの構成をttIsqlプロンプトから表示するには、repschemesコマンドを使用します。
repschemes;
次の例では、「伝播スキーム」で示されているレプリケーション・スキームからの構成出力を示します。
Replication Scheme PROPAGATOR:
Element: A
Type: Table TAB
Master Store: CENTRALDS on FINANCE Transmit Durable
Subscriber Store: PROPDS on NETHANDLER
Element: B
Type: Table TAB
Propagator Store: PROPDS on NETHANDLER Transmit Durable
Subscriber Store: BACKUP1DS on BACKUPSYSTEM1
Subscriber Store: BACKUP2DS on BACKUPSYSTEM2
Store: BACKUP1DS on BACKUPSYSTEM1
Port: (auto)
Log Fail Threshold: (none)
Retry Timeout: 120 seconds
Compress Traffic: Disabled
Store: BACKUP2DS on BACKUPSYSTEM2
Port: (auto)
Log Fail Threshold: (none)
Retry Timeout: 120 seconds
Compress Traffic: Disabled
Store: CENTRALDS on FINANCE
Port: (auto)
Log Fail Threshold: (none)
Retry Timeout: 120 seconds
Compress Traffic: Disabled
Store: PROPDS on NETHANDLER
Port: (auto)
Log Fail Threshold: (none)
Retry Timeout: 120 seconds
Compress Traffic: DisabledttRepAdminユーティリティによる構成情報の表示
レプリケートされたデータベースの構成を表示するには、-showconfigオプションを指定してttRepAdminユーティリティを使用します。
ttRepAdmin -showconfig -dsn masterDSN次に、「伝播スキーム」で示されているレプリケーション・スキームによって構成された伝播済データベースからの構成出力を示します。propdsプロパゲータの待機時間は19.41秒で、マスターよりログ2つ分遅れています。
> ttRepAdmin -showconfig -dsn centralds Self host "finance", port auto, name "centralds", LSN 0/155656, timeout 120, threshold 0 List of subscribers ----------------- Peer name Host name Port State Proto ---------------- ------------------------ ------ ------- ----- propds nethandler Auto Start 10 Last Msg Sent Last Msg Recv Latency TPS RecordsPS Logs ------------- ------------- ------- ------- --------- ---- 0:01:12 - 19.41 5 52 2 List of tables and subscriptions -------------------------------- Table details ------------- Table : tab Timestamp updates : - Master Name Subscriber Name ----------- ------------- centralds propds Table details ------------- Table : tab Timestamp updates : - Master Name Subscriber name ----------- ------------- propds backup1ds propds backup2ds
"List of subscribers"フィールドの意味は、「レプリケーション表の問合せによるサブスクライバに関する情報の表示」を参照してください。Table detailsフィールドには、表およびそのマスター(送信者)とサブスクライバのデータベースの名前が表示されます。
レプリケーション表の問合せによる構成情報の表示
構成情報を表示するには、次のSELECT文を使用して、TTREP.TTSTORES、TTREP.REPSTORES、TTREP.REPPEERS、SYS.MONITOR、TTREP.REPELEMENTSおよびTTREP.REPSUBSCRIPTIONS表を問い合せます。
SELECT t.host_name, t.rep_port_number, t.tt_store_name, s.peer_timeout,
s.fail_threshold
FROM ttrep.ttstores t, ttrep.repstores s
WHERE t.is_local_store = 0X01
AND t.tt_store_id = s.tt_store_id;
SELECT t1.tt_store_name, t1.host_name, t1.rep_port_number,
p.state, p.protocol, p.timesend, p.timerecv, p.latency,
p.tps, p.recspersec, t3.last_log_file - p.sendlsnhigh + 1
FROM ttrep.reppeers p, ttrep.ttstores t1, ttrep.ttstores t2, sys.monitor t3
WHERE p.tt_store_id = t2.tt_store_id
AND t2.is_local_store = 0X01
AND p.subscriber_id = t1.tt_store_id
AND (p.state = 0 OR p.states = 1);
SELECT ds_obj_owner, DS_OBJ_NAME, t1.tt_store_name,t2.tt_store_name
FROM ttrep.repelements e, ttrep.repsubscriptions s,
ttrep.ttstores t1, ttrep.ttstores t2
WHERE s.element_name = e.element_name
AND e.master_id = t1.tt_store_id
AND s.subscriber_id = t2.tt_store_id
ORDER BY ds_obj_owner, ds_obj_name;問合せの出力例は、「伝播スキーム」で示されているレプリケーション・スキームによって構成されたデータベースに関する内容です。
最初の問合せの出力は次のようになります。
< finance, 0, centralds, 120, 0 >
これには、ホスト名、ポート番号およびデータベース名が表示されます。4番目の値(120)は、データベースがメッセージを送信する前に別のデータベースからのレスポンスを待機する時間を定義するTIMEOUT値です。最後の値(0)は、ログ障害しきい値(「トランザクション・ログ障害しきい値の設定」を参照)です。
2番目の問合せの出力は次のようになります。
< propds, nethandler, 0, 0, 7, 1004378953, 0, -1.00000000000000, -1, -1, 1 >
フィールドの説明は、「レプリケーション表の問合せによるサブスクライバに関する情報の表示」を参照してください。
最後の問合せの出力は次のようになります。
< repl, tab, centralds, propds > < repl, tab, propds, backup1ds > < repl, tab, propds, backup2ds >
これらの行には、レプリケート表およびそのマスター(送信者)とサブスクライバ(受信者)のデータベースの名前が表示されます。