OceanBase使用ob-loader-dumper导出表报ORA-00600
执行下面的语句导出表报错,同样的语句之前都没有报错。
ob-loader-dumper-4.2.8-RELEASE/bin/obdumper -h xxx.xxx.xxx.xxx -P 2883 -p 密码 --column-splitter='|' --no-sys-t gzuat_ss#ob8(集群) -D 数据库名 --cut --table teacher --no-nested-dir -f /var/temp/teacher/22050215/ --file-encoding=utf8 --skip-check-dir --retain-empty-files --remove-newline --thread 8 --date-value-format 'yyyy-MM-dd HH:mm:ss' --timestamp-value-format 'yyyy-MM-dd HH:mm:ss'
使用show variables like '%timeout%';查看超时时间配置都跟图上的超时时间不匹配
解决方案:
1、进入导数工具目录下的conf目录下,有个session.config.json文件,将ob_query_timeout的参数加了0后解决。
2、DBA说可能是因为我们的表没有主键导致慢。让加参数--enable-hidden-pk试试。
注:导出无主键表需要一次性查出来然后导出。导出有主键表,导数工具会根据主键做切割,分批导出,就不会遇到到处超时问题。
ob-loader-dumper-4.2.8-RELEASE/bin/obdumper -h xxx.xxx.xxx.xxx -P 2883 -p 密码 --column-splitter='|' --no-sys-t gzuat_ss#ob8(集群租户) -D 数据库名 --cut --table teacher --no-nested-dir -f /var/temp/teacher/22050215/ --file-encoding=utf8 --enable-hidden-pk --skip-check-dir --retain-empty-files --remove-newline --thread 8 --date-value-format 'yyyy-MM-dd HH:mm:ss' --timestamp-value-format 'yyyy-MM-dd HH:mm:ss'