ora2op的安装配置

2024年 1月 10日 63.7k 0

目录

  • 前言
  • 1. ora2op的下载
    • 1.1 下载地址
    • 1.2 ora2op 介绍
  • 2. ora2op的安装
    • 2.1 安装perl的依赖包
    • 2.2 安装连接Oracle数据库的模块
    • 2.3 安装ora2op
    • 2.4 安装连接openGauss数据库的模块
  • 3. 创建迁移项目

前言

本工具是使用perl,以前没使用过perl,所以在安装时时各种问题,解决方式也是一点一点摸索,各种包依赖安装不成功。
所以本文内容水的很,大家在参考使用时要谨慎。
使用的操作系统是centos7.9。
其中

perl -MCPAN -e 'install DBD::Pg'

安装这个模块是各种报错

1. ora2op的下载

1.1 下载地址

在openGauss官方网站上没有直接的下载地址,但是可以找到下载的链接网站。
地址 (https://opengauss.org/zh/supporttools/)


进入后是gitee官方网站。
https://gitee.com/opengauss/openGauss-tools-ora2og

进入后直接点下载、这个网站下载需要账号登录。

下载后的包是这样的
openGauss-tools-ora2og-master.zip

大小为474kb
或者直接从这里下载也行
墨天轮文档:openGauss-tools-ora2og-master.zip
把下载的包上传到操作系统上面

1.2 ora2op 介绍

openGauss-tools-ora2og
介绍
ora2og是一个将Oracle数据库迁移至openGauss的工具,主要编程语言为perl,通过perl DBI模块连接Oracle数据库,自动扫描并提取其中的对象结构及数据,产生SQL脚本,通过手动或自动的方式应用到openGauss。此外,工具还提供丰富配置项,用户可以自定义迁移行为。

ora2og初始代码源自ora2pg,版本为release v21.1:https://github.com/darold/ora2pg/tree/v21.1。

优秀特性
支持导出数据库绝大多数对象类型,包括表、视图、序列、索引、外键、约束、函数、存储过程等。

提供PL/SQL到PL/PGSQL语法的自动转换,一定程度避免了人工修正。

可生成迁移报告,包括迁移难度评估、人天估算。

可选对导出数据进行压缩,节约磁盘开销。

配置选项丰富,可自定义迁移行为。

2. ora2op的安装

2.1 安装perl的依赖包

yum install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker perl-Time-HiRes perl-devel perl-DBI perl-Compress-Zlib perl-open

2.2 安装连接Oracle数据库的模块

这个模块的使用需要先配置oracle客户端
下载oracle 19.10的客户端
官网下载地址
oracle-instantclient19.10-jdbc-19.10.0.0.0-1.x86_64.rpm
oracle-instantclient19.10-sqlplus-19.10.0.0.0-1.x86_64.rpm
oracle-instantclient19.10-devel-19.10.0.0.0-1.x86_64.rpm
oracle-instantclient19.10-basic-19.10.0.0.0-1.x86_64.rpm
在root用户下使用rpm进行安装

rpm -ivh oracle-instantclient19.10-basic-19.10.0.0.0-1.x86_64.rpm
rpm -ivh oracle-instantclient19.10-devel-19.10.0.0.0-1.x86_64.rpm
rpm -ivh oracle-instantclient19.10-jdbc-19.10.0.0.0-1.x86_64.rpm
rpm -ivh oracle-instantclient19.10-sqlplus-19.10.0.0.0-1.x86_64.rpm

在root家目录下配置环境变量

cd /root
vi .base_profile
export ORACLE_HOME=/usr/lib/oracle/19.10/client64
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH

使变量生效

source .base_profile

获取安装包、然后进行编译安装

wget -c https://cpan.metacpan.org/authors/id/M/MJ/MJEVANS/DBD-Oracle-1.80.tar.gz
tar -xvzf DBD-Oracle-1.80.tar.gz
cd DBD-Oracle-1.80/
perl Makefile.PL
make && make install

[root@master01 DBD-Oracle-1.80]# perl Makefile.PL
Multiple copies of Driver.xst found in: /usr/local/lib64/perl5/auto/DBI/ /usr/lib64/perl5/vendor_perl/auto/DBI/ at Makefile.PL line 36.
Using DBI 1.643 (for perl 5.016003 on x86_64-linux-thread-multi) installed in /usr/local/lib64/perl5/auto/DBI/
Configuring DBD::Oracle for perl 5.016003 on linux (x86_64-linux-thread-multi)

If you encounter any problem, a collection of troubleshooting
guides are available under lib/DBD/Oracle/Troubleshooting.
'DBD::Oracle::Troubleshooting' is the general troubleshooting
guide, while platform-specific troubleshooting hints
live in their labelled sub-document (e.g., Win32
hints are gathered in 'lib/DBD/Oracle/Troubleshooting/Win32.pod').

Trying to find an ORACLE_HOME
Your LD_LIBRARY_PATH env var is set to '/opt/huawei/install/om/lib:/opt/huawei/install/om/script/gspylib/clib:'
Found /usr/lib/oracle/19.10/client64

WARNING: Setting ORACLE_HOME env var to /usr/lib/oracle/19.10/client64 for you.
WARNING: If these tests fail you may have to set ORACLE_HOME yourself!
Installing on a linux, Ver#3.10
Using Oracle in /usr/lib/oracle/19.10/client64
DEFINE _SQLPLUS_RELEASE = "1910000000" (CHAR)
Oracle Version 19.10.0.0 (19.10)
Found direct-link candidates: libclntsh.so
Oracle sysliblist:
Found header files in /usr/include/oracle/19.10/client64.
Your LD_LIBRARY_PATH env var is set to '/opt/huawei/install/om/lib:/opt/huawei/install/om/script/gspylib/clib:'
WARNING: Your LD_LIBRARY_PATH env var doesn't include '/usr/lib/oracle/19.10/client64/lib' but probably needs to.

client_version=19.10

DEFINE= -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION="19.10.0.0" -DORA_OCI_102 -DORA_OCI_112

Checking for functioning wait.ph

System: perl5.016003 linux x86-02.bsys.centos.org 3.10.0-957.1.3.el7.x86_64 #1 smp thu nov 29 14:49:43 utc 2018 x86_64 x86_64 x86_64 gnulinux
Compiler: gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
Linker: /usr/bin/ld
Sysliblist:
Linking with -lclntsh.

Checking if your kit is complete...
Looks good
LD_RUN_PATH=/usr/lib/oracle/19.10/client64/lib
Using DBD::Oracle 1.80.
Using DBD::Oracle 1.80.
Multiple copies of Driver.xst found in: /usr/local/lib64/perl5/auto/DBI/ /usr/lib64/perl5/vendor_perl/auto/DBI/ at Makefile.PL line 1807.
Using DBI 1.643 (for perl 5.016003 on x86_64-linux-thread-multi) installed in /usr/local/lib64/perl5/auto/DBI/
Generating a Unix-style Makefile
Writing Makefile for DBD::Oracle
Writing MYMETA.yml and MYMETA.json

[root@master01 DBD-Oracle-1.80]# make && make install
cp lib/DBD/Oracle/Troubleshooting/Cygwin.pod blib/lib/DBD/Oracle/Troubleshooting/Cygwin.pod
cp lib/DBD/Oracle.pm blib/lib/DBD/Oracle.pm
cp Oracle.h blib/arch/auto/DBD/Oracle/Oracle.h
cp lib/DBD/Oracle/Troubleshooting/Vms.pod blib/lib/DBD/Oracle/Troubleshooting/Vms.pod
cp lib/DBD/Oracle/Troubleshooting/Hpux.pod blib/lib/DBD/Oracle/Troubleshooting/Hpux.pod
cp lib/DBD/Oracle/Troubleshooting/Linux.pod blib/lib/DBD/Oracle/Troubleshooting/Linux.pod
cp lib/DBD/Oracle/GetInfo.pm blib/lib/DBD/Oracle/GetInfo.pm
cp lib/DBD/Oracle/Troubleshooting.pod blib/lib/DBD/Oracle/Troubleshooting.pod
cp dbdimp.h blib/arch/auto/DBD/Oracle/dbdimp.h
cp ocitrace.h blib/arch/auto/DBD/Oracle/ocitrace.h
cp lib/DBD/Oracle/Troubleshooting/Sun.pod blib/lib/DBD/Oracle/Troubleshooting/Sun.pod
cp lib/DBD/Oracle/Troubleshooting/Macos.pod blib/lib/DBD/Oracle/Troubleshooting/Macos.pod
cp lib/DBD/Oracle/Troubleshooting/Aix.pod blib/lib/DBD/Oracle/Troubleshooting/Aix.pod
cp lib/DBD/Oracle/Object.pm blib/lib/DBD/Oracle/Object.pm
cp lib/DBD/Oracle/Troubleshooting/Win64.pod blib/lib/DBD/Oracle/Troubleshooting/Win64.pod
cp lib/DBD/Oracle/Troubleshooting/Win32.pod blib/lib/DBD/Oracle/Troubleshooting/Win32.pod
cp mk.pm blib/arch/auto/DBD/Oracle/mk.pm
Running Mkbootstrap for Oracle ()
chmod 644 "Oracle.bs"
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Oracle.bs blib/arch/auto/DBD/Oracle/Oracle.bs 644
"/usr/bin/perl" -p -e "s/~DRIVER~/Oracle/g" /usr/local/lib64/perl5/auto/DBI/Driver.xst > Oracle.xsi
"/usr/bin/perl" "/usr/share/perl5/vendor_perl/ExtUtils/xsubpp" -typemap '/usr/share/perl5/ExtUtils/typemap' -typemap '/root/DBD-Oracle-1.80/typemap' Oracle.xs > Oracle.xsc
mv Oracle.xsc Oracle.c
gcc -c -I/usr/include/oracle/19.10/client64 -I/usr/local/lib64/perl5/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DVERSION="1.80" -DXS_VERSION="1.80" -fPIC "-I/usr/lib64/perl5/CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION="19.10.0.0" -DORA_OCI_102 -DORA_OCI_112 Oracle.c
gcc -c -I/usr/include/oracle/19.10/client64 -I/usr/local/lib64/perl5/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DVERSION="1.80" -DXS_VERSION="1.80" -fPIC "-I/usr/lib64/perl5/CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION="19.10.0.0" -DORA_OCI_102 -DORA_OCI_112 dbdimp.c
gcc -c -I/usr/include/oracle/19.10/client64 -I/usr/local/lib64/perl5/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DVERSION="1.80" -DXS_VERSION="1.80" -fPIC "-I/usr/lib64/perl5/CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION="19.10.0.0" -DORA_OCI_102 -DORA_OCI_112 oci8.c
rm -f blib/arch/auto/DBD/Oracle/Oracle.so
LD_RUN_PATH="/usr/lib/oracle/19.10/client64/lib" gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,relro Oracle.o dbdimp.o oci8.o -o blib/arch/auto/DBD/Oracle/Oracle.so
-L/usr/lib/oracle/19.10/client64/lib -lclntsh

chmod 755 blib/arch/auto/DBD/Oracle/Oracle.so
Manifying 13 pod documents
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Oracle.bs blib/arch/auto/DBD/Oracle/Oracle.bs 644
Manifying 13 pod documents
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/auto/DBD/Oracle/Oracle.h
Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/auto/DBD/Oracle/dbdimp.h
Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/auto/DBD/Oracle/ocitrace.h
Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/auto/DBD/Oracle/mk.pm
Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/auto/DBD/Oracle/Oracle.so
Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/DBD/Oracle.pm
Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/DBD/Oracle/GetInfo.pm
Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/DBD/Oracle/Troubleshooting.pod
Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/DBD/Oracle/Object.pm
Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/DBD/Oracle/Troubleshooting/Cygwin.pod
Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/DBD/Oracle/Troubleshooting/Vms.pod
Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/DBD/Oracle/Troubleshooting/Hpux.pod
Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/DBD/Oracle/Troubleshooting/Linux.pod
Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/DBD/Oracle/Troubleshooting/Sun.pod
Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/DBD/Oracle/Troubleshooting/Macos.pod
Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/DBD/Oracle/Troubleshooting/Aix.pod
Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/DBD/Oracle/Troubleshooting/Win64.pod
Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/DBD/Oracle/Troubleshooting/Win32.pod
Installing /root/perl5/man/man3/DBD::Oracle.3pm
Installing /root/perl5/man/man3/DBD::Oracle::GetInfo.3pm
Installing /root/perl5/man/man3/DBD::Oracle::Object.3pm
Installing /root/perl5/man/man3/DBD::Oracle::Troubleshooting.3pm
Installing /root/perl5/man/man3/DBD::Oracle::Troubleshooting::Aix.3pm
Installing /root/perl5/man/man3/DBD::Oracle::Troubleshooting::Cygwin.3pm
Installing /root/perl5/man/man3/DBD::Oracle::Troubleshooting::Hpux.3pm
Installing /root/perl5/man/man3/DBD::Oracle::Troubleshooting::Linux.3pm
Installing /root/perl5/man/man3/DBD::Oracle::Troubleshooting::Macos.3pm
Installing /root/perl5/man/man3/DBD::Oracle::Troubleshooting::Sun.3pm
Installing /root/perl5/man/man3/DBD::Oracle::Troubleshooting::Vms.3pm
Installing /root/perl5/man/man3/DBD::Oracle::Troubleshooting::Win32.3pm
Installing /root/perl5/man/man3/DBD::Oracle::Troubleshooting::Win64.3pm
Appending installation info to /root/perl5/lib/perl5/x86_64-linux-thread-multi/perllocal.pod
[root@master01 DBD-Oracle-1.80]#

2.3 安装ora2op

解压

[root@master01 ora2op]# unzip openGauss-tools-ora2og-master.zip
Archive: openGauss-tools-ora2og-master.zip
8a98a77d57b32b836c86f82095615732d3636cc7
creating: openGauss-tools-ora2og-master/
extracting: openGauss-tools-ora2og-master/INSTALL
inflating: openGauss-tools-ora2og-master/LICENSE
inflating: openGauss-tools-ora2og-master/MANIFEST
inflating: openGauss-tools-ora2og-master/Makefile.PL
inflating: openGauss-tools-ora2og-master/README
inflating: openGauss-tools-ora2og-master/README.en.md
inflating: openGauss-tools-ora2og-master/README.md
inflating: openGauss-tools-ora2og-master/changelog
creating: openGauss-tools-ora2og-master/doc/
inflating: openGauss-tools-ora2og-master/doc/Ora2Pg.pod
inflating: openGauss-tools-ora2og-master/doc/ora2pg.3
creating: openGauss-tools-ora2og-master/lib/
inflating: openGauss-tools-ora2og-master/lib/Ora2Pg.pm
creating: openGauss-tools-ora2og-master/lib/Ora2Pg/
inflating: openGauss-tools-ora2og-master/lib/Ora2Pg/GEOM.pm
inflating: openGauss-tools-ora2og-master/lib/Ora2Pg/MySQL.pm
inflating: openGauss-tools-ora2og-master/lib/Ora2Pg/PLSQL.pm
creating: openGauss-tools-ora2og-master/packaging/
inflating: openGauss-tools-ora2og-master/packaging/README
creating: openGauss-tools-ora2og-master/packaging/RPM/
inflating: openGauss-tools-ora2og-master/packaging/RPM/ora2pg.spec
creating: openGauss-tools-ora2og-master/packaging/debian/
inflating: openGauss-tools-ora2og-master/packaging/debian/create-deb-tree.sh
creating: openGauss-tools-ora2og-master/packaging/debian/ora2pg/
creating: openGauss-tools-ora2og-master/packaging/debian/ora2pg/DEBIAN/
inflating: openGauss-tools-ora2og-master/packaging/debian/ora2pg/DEBIAN/control
inflating: openGauss-tools-ora2og-master/packaging/debian/ora2pg/DEBIAN/copyright
creating: openGauss-tools-ora2og-master/packaging/slackbuild/
inflating: openGauss-tools-ora2og-master/packaging/slackbuild/Ora2Pg.SlackBuild
inflating: openGauss-tools-ora2og-master/packaging/slackbuild/Ora2Pg.info
inflating: openGauss-tools-ora2og-master/packaging/slackbuild/README
extracting: openGauss-tools-ora2og-master/packaging/slackbuild/doinst.sh
inflating: openGauss-tools-ora2og-master/packaging/slackbuild/slack-desc
creating: openGauss-tools-ora2og-master/scripts/
inflating: openGauss-tools-ora2og-master/scripts/ora2pg
inflating: openGauss-tools-ora2og-master/scripts/ora2pg_scanner
[root@master01 ora2op]#

进入解压目录

cd openGauss-tools-ora2og-master/

开始编译安装

[root@master01 openGauss-tools-ora2og-master]# perl Makefile.PL
Checking if your kit is complete...
Looks good
Invalid LICENSE value 'GPLv3' ignored
Generating a Unix-style Makefile
Writing Makefile for Ora2Pg
Invalid LICENSE value 'GPLv3' ignored
Writing MYMETA.yml and MYMETA.json

Done...
------------------------------------------------------------------------------
Please read documentation at http://ora2pg.darold.net/ before asking for help
------------------------------------------------------------------------------
Now type: make && make install

编译并安装

[root@master01 openGauss-tools-ora2og-master]# make && make install
cp lib/Ora2Pg/GEOM.pm blib/lib/Ora2Pg/GEOM.pm
cp lib/Ora2Pg.pm blib/lib/Ora2Pg.pm
cp lib/Ora2Pg/PLSQL.pm blib/lib/Ora2Pg/PLSQL.pm
cp lib/Ora2Pg/MySQL.pm blib/lib/Ora2Pg/MySQL.pm
cp scripts/ora2pg blib/script/ora2pg
"/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/ora2pg
cp scripts/ora2pg_scanner blib/script/ora2pg_scanner
"/usr/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/ora2pg_scanner
Manifying 1 pod document
Manifying 1 pod document
Installing /root/perl5/lib/perl5/Ora2Pg.pm
Installing /root/perl5/lib/perl5/Ora2Pg/GEOM.pm
Installing /root/perl5/lib/perl5/Ora2Pg/PLSQL.pm
Installing /root/perl5/lib/perl5/Ora2Pg/MySQL.pm
Installing /root/perl5/man/man3/ora2pg.3
Installing /root/perl5/bin/ora2pg
Installing /root/perl5/bin/ora2pg_scanner
Installing default configuration file (ora2pg.conf.dist) to /etc/ora2pg
Appending installation info to /root/perl5/lib/perl5/x86_64-linux-thread-multi/perllocal.pod
[root@master01 openGauss-tools-ora2og-master]#

2.4 安装连接openGauss数据库的模块

wget -c https://cpan.metacpan.org/authors/id/T/TU/TURNSTEP/DBD-Pg-3.14.2.tar.gz
gunzip DBD-Pg-3.14.2.tar.gz
tar -xvf DBD-Pg-3.14.2.tar
cd DBD-Pg-3.14.2/
vi .bash_profile

export ORACLE_HOME=/usr/lib/oracle/19.10/client64
export GAUSSHOME=/opt/huawei/install/app
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$GAUSSHOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$GAUSSHOME/bin:$PATH

source .bash_profile

perl Makefile.PL
yum install /usr/include/libpq-fe.h
make && make install

[root@master01 DBD-Pg-3.14.2]# perl Makefile.PL
Configuring DBD::Pg 3.14.2
PostgreSQL version: 90204 (default port: 5432)
POSTGRES_HOME: (not set)
POSTGRES_INCLUDE: /opt/huawei/install/app/include
POSTGRES_LIB: /opt/huawei/install/app/lib
OS: linux
Multiple copies of Driver.xst found in: /usr/local/lib64/perl5/auto/DBI/ /usr/li b64/perl5/vendor_perl/auto/DBI/ at Makefile.PL line 182.
Checking if your kit is complete...
Looks good
Multiple copies of Driver.xst found in: /usr/local/lib64/perl5/auto/DBI/ /usr/li b64/perl5/vendor_perl/auto/DBI/ at Makefile.PL line 284.
Using DBI 1.643 (for perl 5.016003 on x86_64-linux-thread-multi) installed in /u sr/local/lib64/perl5/auto/DBI/
Generating a Unix-style Makefile
Writing Makefile for DBD::Pg
Writing MYMETA.yml and MYMETA.json

[root@master01 DBD-Pg-3.14.2]# make
Skip blib/lib/Bundle/DBD/Pg.pm (unchanged)
Skip blib/lib/DBD/Pg.pm (unchanged)
Running Mkbootstrap for Pg ()
chmod 644 "Pg.bs"
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Pg.bs blib/arch/auto/DBD/Pg/Pg.bs 644
gcc -c -I/opt/huawei/install/app/include -I/usr/local/lib64/perl5/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPGLIBVERSION=90204 -DPGDEFPORT=5432 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION="3.14.2" -DXS_VERSION="3.14.2" -fPIC "-I/usr/lib64/perl5/CORE" Pg.c
gcc -c -I/opt/huawei/install/app/include -I/usr/local/lib64/perl5/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPGLIBVERSION=90204 -DPGDEFPORT=5432 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION="3.14.2" -DXS_VERSION="3.14.2" -fPIC "-I/usr/lib64/perl5/CORE" dbdimp.c
gcc -c -I/opt/huawei/install/app/include -I/usr/local/lib64/perl5/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPGLIBVERSION=90204 -DPGDEFPORT=5432 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION="3.14.2" -DXS_VERSION="3.14.2" -fPIC "-I/usr/lib64/perl5/CORE" quote.c
In file included from Pg.h:58:0,
from quote.c:10:
/usr/local/lib64/perl5/auto/DBI/DBIXS.h:493:25: warning: ‘dbi_get_state’ defined but not used [-Wunused-function]
static dbistate_t** dbi_get_state(pTHX) {
^
/usr/local/lib64/perl5/auto/DBI/DBIXS.h:506:27: note: in expansion of macro ‘_DBISTATE_DECLARE_COMMON’
# define DBISTATE_DECLARE _DBISTATE_DECLARE_COMMON
^
Pg.h:64:1: note: in expansion of macro ‘DBISTATE_DECLARE’
DBISTATE_DECLARE;
^
gcc -c -I/opt/huawei/install/app/include -I/usr/local/lib64/perl5/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPGLIBVERSION=90204 -DPGDEFPORT=5432 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION="3.14.2" -DXS_VERSION="3.14.2" -fPIC "-I/usr/lib64/perl5/CORE" types.c
In file included from Pg.h:58:0,
from types.c:15:
/usr/local/lib64/perl5/auto/DBI/DBIXS.h:493:25: warning: ‘dbi_get_state’ defined but not used [-Wunused-function]
static dbistate_t** dbi_get_state(pTHX) {
^
/usr/local/lib64/perl5/auto/DBI/DBIXS.h:506:27: note: in expansion of macro ‘_DBISTATE_DECLARE_COMMON’
# define DBISTATE_DECLARE _DBISTATE_DECLARE_COMMON
^
Pg.h:64:1: note: in expansion of macro ‘DBISTATE_DECLARE’
DBISTATE_DECLARE;
^
rm -f blib/arch/auto/DBD/Pg/Pg.so
LD_RUN_PATH="/opt/huawei/install/app/lib" gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,relro Pg.o dbdimp.o quote.o types.o -o blib/arch/auto/DBD/Pg/Pg.so
-L/opt/huawei/install/app/lib -lpq -lm

chmod 755 blib/arch/auto/DBD/Pg/Pg.so
Manifying 2 pod documents
[root@master01 DBD-Pg-3.14.2]# make install
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Pg.bs blib/arch/auto/DBD/Pg/Pg.bs 644
Manifying 2 pod documents
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/auto/DBD/Pg/Pg.so
Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/DBD/Pg.pm
Installing /root/perl5/lib/perl5/x86_64-linux-thread-multi/Bundle/DBD/Pg.pm
Installing /root/perl5/man/man3/DBD::Pg.3pm
Installing /root/perl5/man/man3/Bundle::DBD::Pg.3pm
Appending installation info to /root/perl5/lib/perl5/x86_64-linux-thread-multi/perllocal.pod
[root@master01 DBD-Pg-3.14.2]#

3. 创建迁移项目

[root@master01 ~]# ora2pg --project_base /root/ora2openGauss --init_project ora2op
Creating project ora2op.
/root/ora2openGauss/ora2op/
schema/
dblinks/
directories/
functions/
grants/
mviews/
packages/
partitions/
procedures/
sequences/
synonyms/
tables/
tablespaces/
triggers/
types/
views/
sources/
functions/
mviews/
packages/
partitions/
procedures/
triggers/
types/
views/
data/
config/
reports/

Generating generic configuration file
Creating script export_schema.sh to automate all exports.
Creating script import_all.sh to automate all imports.

相关文章

Oracle如何使用授予和撤销权限的语法和示例
Awesome Project: 探索 MatrixOrigin 云原生分布式数据库
下载丨66页PDF,云和恩墨技术通讯(2024年7月刊)
社区版oceanbase安装
Oracle 导出CSV工具-sqluldr2
ETL数据集成丨快速将MySQL数据迁移至Doris数据库

发布评论