alibaba / yugong

阿里巴巴去Oracle数据迁移同步工具(全量+增量,目标支持MySQL/DRDS)
GNU General Public License v2.0
2.5k stars 957 forks source link

我的数据源里面有两个用户A1,B1,两个用户下都有表syslog #74

Open study-day opened 6 years ago

study-day commented 6 years ago

我的数据源里面有两个用户A1,B1,两个用户下都有表syslog.同步到目标表C1。但是yugong的conf下的生成的*。dat文件,把两个用户下的都生成了,我只是同步一个用户下的,结果所有用户下的表都配置出来了,结果就是同步不成功

study-day commented 6 years ago

oralce 下如果多个用户名下有同一张表,那么在同步时,这多个用户名下的同名表就会被检测到。但是这并不是配置者想要的。这个地方有没有详细的说明呢

alswl commented 6 years ago

把配置文件贴一下,去掉账密。

study-day commented 6 years ago

比如说 是目标库里面的多个用户(U1,U2,U3)有同一个表A时,我现在要往U3.A里同步数据,U3.A是空表,但是yugong就会先去想U1.A U2.A中写数据,但是这两个有数据啊,于是就主键冲突就不能同步了、

study-day commented 6 years ago
yugong.database.source.username=*******
yugong.database.source.password=*******
yugong.database.source.type=ORACLE
yugong.database.source.url=jdbc:oracle:thin:@*******
yugong.database.source.encode=UTF-8
yugong.database.source.poolSize=30

yugong.database.target.url=jdbc:oracle:thin:@*******
yugong.database.target.username=******* 
yugong.database.target.password=*******
yugong.database.target.type=ORACLE
yugong.database.target.encode=UTF-8
yugong.database.target.poolSize=30

yugong.table.batchApply=true
yugong.table.onceCrawNum=1000
yugong.table.tpsLimit=0
# use connection default schema
yugong.table.ignoreSchema=true
# skip Applier Load Db failed data
yugong.table.skipApplierException=false

#yugong.table.white=yugong_example_join,yugong_example_oracle,yugong_example_two
yugong.table.white=*********
yugong.table.black=

# tables use multi-thread enable or disable
yugong.table.concurrent.enable=true
# tables use multi-thread size
yugong.table.concurrent.size=5
# retry times 
yugong.table.retry.times = 3
# retry interval or sleep time (ms)
yugong.table.retry.interval = 1000
# MARK/FULL/INC/ALL(REC+FULL+INC)/CHECK/CLEAR
yugong.table.mode=ALL

# yugong extractor
yugong.extractor.dump=false
yugong.extractor.concurrent.enable=true
yugong.extractor.concurrent.global=false
yugong.extractor.concurrent.size=30
yugong.extractor.noupdate.sleep=1000
yugong.extractor.noupdate.thresold=0
yugong.extractor.once=false
# {0} is all columns , {1}.{2} is schemaName.tableName , {3} is primaryKey
#yugong.extractor.sql=select /*+parallel(t)*/ {0} from {1}.{2} t
#yugong.extractor.sql=select * from (select {0} from {1}.{2} t where {3} > ? order by {3} asc) where rownum <= ?

# yugong applier
yugong.applier.concurrent.enable=true
yugong.applier.concurrent.global=false
yugong.applier.concurrent.size=30
yugong.applier.dump=false

# stats
yugong.stat.print.interval=5
yugong.progress.print.interval=1

# alarm email
# yugong.alarm.email.host = smtp.163.com
# yugong.alarm.email.username = test@163.com
# yugong.alarm.email.password = 
# yugong.alarm.email.stmp.port = 465
# yugong.alarm.receiver=test@163.com
zilanghuo commented 5 years ago

麻烦请问下,这个问题后来的解决方案是什么嘛?