- 论坛徽章:
- 0
|
"我从不采用整库复制——除非把数据和脚本彻底剥离。
因为采用database replication的时候,A上执行过一次trigger把数据加了几条,B上也会同样执行该trigger增加这几条数据,然后A上增加的那几条数据又给传过来了——然后就造成了重复数据.我吃过这个苦头。"
Wrong!!!
By default, the standby DSI thread executes a set triggers off Adaptive Server command when it logs in to a standby database. This prevents Adaptive Server from firing triggers for the replicated transactions, thereby preventing duplicate updates in the standby database.You can alter the default behavior by using the alter connection command to configure a connection to fire or not fire triggers. To do this, set the dsi_keep_triggers configuration parameter to “on” or “off.” The default dsi_keep_triggers setting for all connections except standby databases is “on.” |
|