利用.sql文件导入,如果有事件存在会报错需要怎么处理


Total Count: 26498 End Time: 2024-11-22 09:57:04

2024-11-22 09:57:04 [WARN] Failed to run data transfer task.
java.lang.IllegalStateException: ilink_biz_firecontrol.ilink_biz_firecontrol.sql: Loading SQL-format file: “C:\Users\Administrator\AppData\Roaming\odc\data\data_transfer\67\ilink_biz_firecontrol.sql” failure. Reason: You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near 'EVENT IF EXISTS del-tb_records_analog_info’ at line 4. Please see …/logs/ob-loader-dumper.error
at com.oceanbase.odc.plugin.task.obmysql.datatransfer.task.BaseOceanBaseTransferJob.syncWaitFinished(BaseOceanBaseTransferJob.java:241) ~[?:?]
at com.oceanbase.odc.plugin.task.obmysql.datatransfer.task.BaseOceanBaseTransferJob.call(BaseOceanBaseTransferJob.java:170) ~[?:?]
at com.oceanbase.odc.plugin.task.obmysql.datatransfer.task.BaseOceanBaseTransferJob.call(BaseOceanBaseTransferJob.java:56) ~[?:?]
at com.oceanbase.odc.service.datatransfer.task.DataTransferTask.call(DataTransferTask.java:135) ~[odc-service-4.3.2-20241017.jar!/:?]
at com.oceanbase.odc.service.datatransfer.task.DataTransferTask.call(DataTransferTask.java:100) ~[odc-service-4.3.2-20241017.jar!/:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_292]
at com.oceanbase.odc.common.trace.TraceDecorator.lambda$decorate$0(TraceDecorator.java:40) ~[odc-common-4.3.2-20241017.jar!/:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_292]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_292]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292]
2024-11-22 09:57:04 [WARN] Failed to run data transfer task.
java.lang.IllegalStateException: ilink_biz_firecontrol.ilink_biz_firecontrol.sql: Loading SQL-format file: “C:\Users\Administrator\AppData\Roaming\odc\data\data_transfer\67\ilink_biz_firecontrol.sql” failure. Reason: You have an error in your SQL syntax; check the manual that corresponds to your OceanBase version for the right syntax to use near 'EVENT IF EXISTS del-tb_records_analog_info’ at line 4. Please see …/logs/ob-loader-dumper.error
at com.oceanbase.odc.plugin.task.obmysql.datatransfer.task.BaseOceanBaseTransferJob.syncWaitFinished(BaseOceanBaseTransferJob.java:241) ~[?:?]
at com.oceanbase.odc.plugin.task.obmysql.datatransfer.task.BaseOceanBaseTransferJob.call(BaseOceanBaseTransferJob.java:170) ~[?:?]
at com.oceanbase.odc.plugin.task.obmysql.datatransfer.task.BaseOceanBaseTransferJob.call(BaseOceanBaseTransferJob.java:56) ~[?:?]
at com.oceanbase.odc.service.datatransfer.task.DataTransferTask.call(DataTransferTask.java:135) ~[odc-service-4.3.2-20241017.jar!/:?]
at com.oceanbase.odc.service.datatransfer.task.DataTransferTask.call(DataTransferTask.java:100) ~[odc-service-4.3.2-20241017.jar!/:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_292]
at com.oceanbase.odc.common.trace.TraceDecorator.lambda$decorate$0(TraceDecorator.java:40) ~[odc-common-4.3.2-20241017.jar!/:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_292]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_292]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292]
2024-11-22 09:57:04 [INFO] Deleted file, fileName=ilink_biz_firecontrol.sql, result=false

我这边查看了一下确实是直行到事件的地方报错了。OceanBase是不支持mysql里面的事件吗

看以前的帖子暂时应该是不支持的
社区版有没有mysql的 CREATE EVENT 功能???r1s1v0_gaNjMwMzYyMDM2LjE3MzEyOTE0MDM._ga_T35KTM57DZ*MTczMjI1NDM3MC4zMS4xLjE3MzIyNTQ3MzUuNDcuMC4w

create event 从ob4.2.4开始支持 你看看你的ob是什么版本

1 个赞