EDB - xDB 組態

xDB Configuration - xDB 組態

xDB Setup

Odoo image and text block

1. 先確認所有service是否running…

Odoo image and text block

2.選xDB Replication Console

Odoo image and text block

3.Console的使用者介面

Odoo image and text block

4.於Replication Servers上按右鍵選”Register Publication Server”

Odoo image and text block

5.輸入Publication Server的host, port, user name, password,此處是指在安裝xDB時Publication Server的主機並非要被複製的主機

Odoo image and text block

5.1如果host輸入localhost會有以下的warning,可直接選Yes略過

Odoo image and text block

6.完成後如下

Odoo image and text block

7.接著於Replication Servers上按右鍵選”Register Subscription Server”

Odoo image and text block

8. 輸入Subscription Server的host, port, user name, password,此處是指在安裝xDB時Subscription Server的主機並非複製的主機

Odoo image and text block

9. Subscription Server完成後如下

Odoo image and text block

10.選定Publication Server下的SMR,按右鍵選Add Database(Source Database)

Odoo image and text block

11.選擇Source Database的type (oracle / PPAS / SQL Server / Postgres),並輸入該資料庫的連線資訊,設定好後可按下Test來確認連線是否正常,如果正常就可以按下Save.否則需確認資料庫的連線問題。

另外如果選擇的Database Type是Oracle,請將ojdbc14.jar放置於EDB_HOME/lib/jdbc/,然後重啟publication及subscription server: 注意:Oracle DB需利用以下statement來設定權限CREATE USER pubuser IDENTIFIED BY password; GRANT CONNECT TO pubuser; GRANT RESOURCE TO pubuser; GRANT CREATE ANY TRIGGER TO pubuser; GRANT SELECT ON edb.dept TO pubuser; GRANT SELECT ON edb.emp TO pubuser;

Odoo image and text block

11-1 Success

Odoo image and text block

12.Add Database後就能看到在”SMR”下就有剛剛新增的資料庫

Odoo image and text block

13.接著建立Publication (DataSet),按右鍵選Create Publication

Odoo image and text block

14.填入Publication Name及勾選要Replication的table後按下Create

Odoo image and text block

14-1.Create successfully.

Odoo image and text block

15.完成後就會看到pub-dataset

Odoo image and text block

16.接著由Subscription Server下按右鍵來Add Database (Target Database)

Odoo image and text block

17 輸入資料庫的連線資訊

Odoo image and text block

17-1.建立後按下Test結果顯示Success後按下Save 

Odoo image and text block

17.2 如host輸入localhost會有warning,請按Yes略過

Odoo image and text block

18. Add Database後就能看到在”Subscription Server”下就有剛剛新增的資料庫

Odoo image and text block

19.接著按右鍵選Create Subscription (subscription dataset)

Odoo image and text block

20.此時會跳出來要求輸入Publication Server的資訊,請輸入publication server的所有資訊 (非Source database 也非 Target database而是xDB安裝的主機),輸入完後按”Load”,就能看到 13~15步驟建立的pub-dataset了,按Create.

Odoo image and text block

21.完成後如下圖所示

Odoo image and text block

22.建立Snapshot

Odoo image and text block

22-1.建立snapshot

Odoo image and text block

22-2.建立成功

Odoo image and text block

23.Synchronize Replication

Odoo image and text block

23-1.Synchronize

Odoo image and text block

23-2.Synchronize Replication success.

Odoo image and text block

24.組態同步排程

Odoo image and text block

24-1.有多種選項,選擇你要的排程方式,這裡用synchronize及continuously來說明

Odoo image and text block

24.2同步間隔設定為1sec.

Odoo image and text block

24-3.Finish!!

Odoo image and text block

25.到Source Database去新增資料

Odoo image and text block

25-1.看看Target Database是否有同步