Home > Database > Mysql Tutorial > SymmetricDS配置InitialLoad的步骤

SymmetricDS配置InitialLoad的步骤

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 16:12:11
Original
1076 people have browsed it

Trigger中有一种Dead Trigger,用法较多,可以参考其定义,其中一个就是恢复单向同步的表的初始负载。也就是说要发起一次初始负载,就是要创建一个Dead Trigger。 1. 创建一个channel insert intosym_channel(channel_id,processing_order, max_batch_size,

Trigger中有一种Dead Trigger,用法较多,可以参考其定义,其中一个就是恢复单向同步的表的初始负载。也就是说要发起一次初始负载,就是要创建一个Dead Trigger。

1. 创建一个channel

insert intosym_channel
(channel_id,processing_order, max_batch_size, enabled, description)
values('sale_transaction', 1, 100000, 1,'sale_transactional data from register and back office');
Copy after login

2. 创建一个Dead Trigger,将想要初始负载的表加入到channel中,初始负载的方向是单向的

insert intosym_trigger
(trigger_id,source_table_name,channel_id,sync_on_insert, sync_on_update, sync_on_delete, last_update_time,create_time)
values('sale_transaction_dead','sale_transaction','sale_transaction',0,0,0,current_timestamp,current_timestamp);
Copy after login

3. 创建一个Router

insert intosym_router
(router_id,source_node_group_id,target_node_group_id,router_type,create_time,last_update_time)
values('store_2_corp', 'store', 'corp','default',current_timestamp, current_timestamp);
Copy after login

4. 创建一个trigger-router组合

insert intosym_trigger_router
(trigger_id,router_id,initial_load_order,last_update_time,create_time)
values('sale_transaction_dead','store_2_corp', 200,current_timestamp, current_timestamp);
Copy after login

经过上边的四步之后,在一个节点注册到另一个节点的之后,下一步就是initial load的过程。要重新load一次,可以在initial load过程中输出数据的节点上运行下面的命令:

../bin/symadmin --engine corp-000reload-node 001
Copy after login

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template