Publication control schema does not exist on target database
這時我們就得清除所有的xDB metadata才能再讓xDB
以下記錄清除的步驟:
1.Stop Publication / Subscription Server
-#/etc/init.d/edb-xdbpubserver stop
-#/etc/init.d/edb-xdbsubserver stop
2.確認publication 的 metadata database objects
-for Oracle
SQL> CONNECT pubuser/password
SQL> SELECT table_name FROM user_tables;
SQL> SELECT sequence_name FROM user_sequences;
SQL> SELECT DISTINCT name FROM user_source WHERE type = 'PACKAGE';
SQL> SELECT trigger_name FROM user_triggers;
-synchronization
會多出RRST_開頭的Table
會多出RRPI_, RRPU_及RRPD_開頭的Trigger, for每個repl的table.
-snapshot
就沒有RRST_開頭的Table及沒有任何Trigger
-for EDB
會產生_edb_replicator_pub這個schema。如下圖
3.刪除這些Publication Database Objects
-for Oracle
SQL> CONNECT system/password
SQL> DROP USER pubuser CASCADE;
-for EDB
postgres=# \c edb postgres
edb=# DROP SCHEMA _edb_replicator_pub CASCADE;
4.刪除xDB Control Database的內容,主要是刪除
_edb_replicator_pub及_edb_replicator_sub這兩個Schema及以下的所有內容
xdb=# DROP SCHEMA _edb_replicator_pub CASCADE;
xdb=# DROP SCHEMA _edb_replicator_sub CASCADE;
5. Start Publication / Subscription Server
-#/etc/init.d/edb-xdbpubserver start
-#/etc/init.d/edb-xdbsubserver start
6.就可以看到xDB裡面整個都是乾淨的了
沒有留言:
張貼留言