Contents
  1. 1. JDBC连接
  2. 2. obdumper
    1. 2.1. 指定压缩
    2. 2.2. 避免超时

JDBC连接

Maven Repository: com.oceanbase » oceanbase-client (mvnrepository.com)

引入oceanbase-client-1.1.10.jar到spark的jars目录,使用Beeline连接
!connnect jdbc:oceanbase://ip:2883/DB

用户名格式有:用户名@租户名#集群名集群名:租户名:用户名集群名-租户名-用户名 、集群名.租户名.用户名

obdumper

指定压缩

–compress –compression-algo snappy

https://www.oceanbase.com/docs/common-oceanbase-dumper-loader-1000000001189488

避免超时

Error: ORA-00600: internal error code, arguments: -4012, Timeout

–session-config oceanbase_ctrl/session.config.json

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"init_sql": {
"oracle": [
"set names utf8",
"set autocommit=1",
"set session ob_query_timeout=172800000000",
"set session ob_trx_timeout=172805000000"
],
"mysql": [
"set names utf8",
"set autocommit=1",
"set session ob_query_timeout=172800000000",
"set session ob_trx_timeout=172805000000"
]
}
}