点击上方"蓝字"
关注我们,享更多干货!
一、准备环境
1. 源库创建(Oracle)
创建Oracle 11.2.0.4
docker pull registry.cn-hangzhou.aliyuncs.com/lhrbest/oracle_11g_ee_lhr_11.2.0.4:1.0
docker run -itd --name oracle -h oracle --privileged=true -p 1521:1521 -p 222:22 -p 1158:1158 lhrbest/oracle_11g_ee_lhr_11.2.0.4:1.0 init
MTK程序迁移Oracle需要安装Oracle客户端
安装Oracle客户端
wget https://download.oracle.com/otn_software/linux/instantclient/211000/oracle-instantclient-basic-21.1.0.0.0-1.x86_64.rpm
wget https://download.oracle.com/otn_software/linux/instantclient/211000/oracle-instantclient-sqlplus-21.1.0.0.0-1.x86_64.rpm
rpm -ivh oracle-instantclient-basic-21.1.0.0.0-1.x86_64.rpm oracle-instantclient-sqlplus-21.1.0.0.0-1.x86_64.rpm
export LD_LIBRARY_PATH=/usr/lib/oracle/21/client64/lib
2. 目标库创建(MogDB)
二、迁移
1. 上传程序,编写配置文件
迁移为Oracle下的scott用户
编写配置文件
[root@mogdb-kernel-0005 mtk]# cat mtk_config.json
{
"source": {
"type": "oracle",
"connect": {
"version": "",
"host": "172.16.0.176",
"user": "system",
"port": 1521,
"password": "system",
"dbName": "LHR11G",
"dsn": ""
},
"parameter": {
"debugTest