Giter Club home page Giter Club logo

ora2pg's People

Contributors

guy-incognito avatar hakan42 avatar jbek7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ora2pg's Issues

Can't locate DBD/oracle.pm

Hello, I have had the next error when I try to run the image:

install_driver(oracle) failed: Can't locate DBD/oracle.pm in @INC (you may need to install the DBD::oracle module) (@INC contains: /usr/local/lib/perl5/site_perl/5.28.1/x86_64-linux-gnu /usr/local/lib/perl5/site_perl/5.28.1 /usr/local/lib/perl5/vendor_perl/5.28.1/x86_64-linux-gnu /usr/local/lib/perl5/vendor_perl/5.28.1 /usr/local/lib/perl5/5.28.1/x86_64-linux-gnu /usr/local/lib/perl5/5.28.1) at (eval 15) line 3. Perhaps the DBD::oracle perl module hasn't been fully installed, or perhaps the capitalisation of 'oracle' isn't right. Available drivers: DBM, ExampleP, File, Gofer, Mem, Oracle, Proxy, Sponge. at /usr/local/lib/perl5/site_perl/5.28.1/Ora2Pg.pm line 1624.

Thanks.

M1 arm64 docker build failure

#docker build -t ora2pg --platform linux/amd64 .

Failed test '$maxlen >= 200 (50)'

#11 903.3 # at t/test.t line 235.
#11 903.3 sysread(): Input/output error at t/test.t line 154.
#11 903.3 Slave got EOF at line 51, byte 0.
#11 904.4 # Looks like you failed 1 test of 5.
#11 904.4 t/test.t .............
#11 904.4 Dubious, test returned 1 (wstat 256, 0x100)
#11 904.4 Failed 1/5 subtests
#11 904.4
#11 904.4 Test Summary Report
#11 904.4 -------------------
#11 904.4 t/test.t (Wstat: 256 (exited 1) Tests: 5 Failed: 1)
#11 904.4 Failed test: 5
#11 904.4 Non-zero exit status: 1
#11 904.4 Files=2, Tests=6, 18 wallclock secs ( 0.09 usr 0.01 sys + 0.73 cusr 0.11 csys = 0.94 CPU)
#11 904.4 Result: FAIL
#11 904.4 Failed 1/2 test programs. 1/6 subtests failed.
#11 904.4 make: *** [Makefile:1040: test_dynamic] Error 1
#11 905.9 TODDR/IO-Tty-1.17.tar.gz
#11 905.9 /usr/bin/make test -- NOT OK
#11 905.9 //hint// to see the cpan-testers results for installing this module, try:
#11 905.9 reports TODDR/IO-Tty-1.17.tar.gz
#11 905.9 AUDREYT/Module-Signature-0.88.tar.gz
#11 905.9 Has already been unwrapped into directory /root/.cpan/build/Module-Signature-0.88-0
#11 905.9 AUDREYT/Module-Signature-0.88.tar.gz
#11 905.9 Has already been prepared
#11 905.9 Running make for A/AU/AUDREYT/Module-Signature-0.88.tar.gz
#11 906.0 Warning: Prerequisite 'IPC::Run => 0' for 'AUDREYT/Module-Signature-0.88.tar.gz' failed when processing 'TODDR/IPC-Run-20220807.0.tar.gz' with 'make_test => NO'. Continuing, but chances to succeed are limited.
#11 907.9 cp lib/Module/Signature.pm blib/lib/Module/Signature.pm
#11 907.9 cp script/cpansign blib/script/cpansign
#11 908.0 "/usr/local/bin/perl" "-Iinc" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/cpansign
#11 908.5 AUDREYT/Module-Signature-0.88.tar.gz
#11 908.5 /usr/bin/make -- OK
#11 910.2 The current configuration of allow_installing_outdated_dists is 'ask/no', but for this option we would need 'CPAN::DistnameInfo' installed. Please install 'CPAN::DistnameInfo' as soon as possible. As long as we are not equipped with 'CPAN::DistnameInfo' this option does not take effect
#11 910.2 Running make test for AUDREYT/Module-Signature-0.88.tar.gz
#11 910.3 PERL_DL_NONLAZY=1 "/usr/local/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef Test::Harness::Switches; test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/.t
#11 911.0 t/0-signature.t .. skipped: Set the environment variable TEST_SIGNATURE to enable this test.
#11 911.4 t/1-basic.t ...... ok
#11 911.8 t/2-cygwin.t ..... skipped: Cygwin only tests
#11 912.1 Can't locate IPC/Run.pm in @inc (you may need to install the IPC::Run module) (@inc contains: /root/.cpan/build/Module-Signature-0.88-0/inc /root/.cpan/build/Module-Signature-0.88-0/blib/lib /root/.cpan/build/Module-Signature-0.88-0/blib/arch /usr/local/lib/perl5/site_perl/5.36.0/x86_64-linux-gnu /usr/local/lib/perl5/site_perl/5.36.0 /usr/local/lib/perl5/vendor_perl/5.36.0/x86_64-linux-gnu /usr/local/lib/perl5/vendor_perl/5.36.0 /usr/local/lib/perl5/5.36.0/x86_64-linux-gnu /usr/local/lib/perl5/5.36.0 .) at t/3-verify.t line 6.
#11 912.1 BEGIN failed--compilation aborted at t/3-verify.t line 6.
#11 912.1 t/3-verify.t .....
#11 912.1 Dubious, test returned 2 (wstat 512, 0x200)
#11 912.1 No subtests run
#11 912.1
#11 912.1 Test Summary Report
#11 912.1 -------------------
#11 912.1 t/3-verify.t (Wstat: 512 (exited 2) Tests: 0 Failed: 0)
#11 912.1 Non-zero exit status: 2
#11 912.1 Parse errors: No plan found in TAP output
#11 912.1 Files=4, Tests=2, 1 wallclock secs ( 0.07 usr 0.01 sys + 1.33 cusr 0.09 csys = 1.50 CPU)
#11 912.1 Result: FAIL
#11 912.1 Failed 1/4 test programs. 0/2 subtests failed.
#11 912.1 make: *** [Makefile:796: test_dynamic] Error 2
#11 914.2 AUDREYT/Module-Signature-0.88.tar.gz
#11 914.2 one dependency not OK (IPC::Run); additionally test harness failed
#11 914.2 /usr/bin/make test -- NOT OK
#11 914.2 //hint// to see the cpan-testers results for installing this module, try:
#11 914.2 reports AUDREYT/Module-Signature-0.88.tar.gz

executor failed running [/bin/sh -c cpan install Test::NoWarnings && cpan install DBI && cpan install DBD::Pg && cpan install Bundle::Compress::Zlib && cpan install CPAN::DistnameInfo && cpanm install IPC::Run && cpanm install DBD::[email protected]]: exit code: 1

# Install DBI module with Postgres, Oracle and Compress::Zlib module RUN cpan install Test::NoWarnings &&\ cpan install DBI &&\ cpan install DBD::Pg &&\ cpan install Bundle::Compress::Zlib &&\ cpan install CPAN::DistnameInfo &&\ cpanm install IPC::Run &&\ cpanm install DBD::[email protected]

Missing DBD::Oracle module with built ora2pg v23

As v23 is not released on Docker Hub (is there a particular reason for this?), I'm trying to build it on my own, I've used the command:

docker build https://github.com/Guy-Incognito/ora2pg.git#23.0 -t ora2pg:23

If I try to use the resulting image it says:

install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in @INC (you may need to install the DBD::Oracle module) (@INC contains: /usr/local/lib/perl5/site_perl/5.34.0/x86_64-linux-gnu /usr/local/lib/perl5/site_perl/5.34.0 /usr/local/lib/perl5/vendor_perl/5.34.0/x86_64-linux-gnu /usr/local/lib/perl5/vendor_perl/5.34.0 /usr/local/lib/perl5/5.34.0/x86_64-linux-gnu /usr/local/lib/perl5/5.34.0) at (eval 13) line 3.
Perhaps the DBD::Oracle perl module hasn't been fully installed,
or perhaps the capitalisation of 'Oracle' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Mem, Pg, Proxy, Sponge.
 at /usr/local/lib/perl5/site_perl/5.34.0/Ora2Pg.pm line 1901.

I'm not a Perl expert so sadly I have no idea where this goes sideways. Attaching the whole build log. ora2pg23_build.log
If you could publish a working image to Docker Hub that would be great help as well.

docker run failing

Hi,
I have created the image successfully but when I try to run the image, the container is not coming up
can you please help in this?

docker run d_ora2pg:v2

Loading DB routines from perl5db.pl version 1.60
Editor support available.

Enter h or 'h h' for help, or 'man perldebug' for more help.

main::(-e:1): 0
DB<1>

Below is Docker file:

FROM perl:slim

ARG ORA2PG_VERSION=23.0

ugly fix for "update-alternatives" missing directories in slim image

RUN mkdir -p /usr/share/man/man1 &&
mkdir -p /usr/share/man/man7
RUN apt-get update && apt-get install -y -q --no-install-recommends
unzip
curl
ca-certificates
rpm
alien
libaio1
# Install postgresql
postgresql-client
# Install mysql
libdbd-mysql
#install Perl Database Interface
libdbi-perl
bzip2
libpq-dev
libdbd-pg-perl

ENV ORACLE_HOME=/usr/lib/oracle/12.2/client64
ENV TNS_ADMIN=/usr/lib/oracle/12.2/client64/network/admin
ENV LD_LIBRARY_PATH=/usr/lib/oracle/12.2/client64/lib
ENV PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/oracle/12.2/client64/bin

Install Oracle Client

RUN mkdir /usr/lib/oracle/12.2/client64/network/admin -p

COPY oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm /tmp
COPY oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm /tmp
COPY oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64.rpm /tmp
RUN alien -i /tmp/oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm &&
alien -i /tmp/oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm &&
alien -i /tmp/oracle-instantclient12.2-sqlplus-12.2.0.1.0-1.x86_64.rpm

Install ora2pg

COPY DBD-Oracle-1.74.tar.gz /tmp
COPY v23.0.zip /tmp

RUN perl -MCPAN -e 'install DBD::Oracle' &&
perl -MCPAN -e 'install DBI' &&
perl -MCPAN -e 'install DBD::Pg' &&
perl -MCPAN -e 'install DBD::Oracle' &&
perl -MCPAN -e 'install Bundle::Compress::Zlib'

#RUN cd /tmp && tar -zxvf /tmp/DBD-Oracle-1.74.tar.gz &&
#cd /tmp/DBD-Oracle-1.74 && perl Makefile.PL -l && make && make install

RUN cd /tmp && unzip v23.0.zip && rm -f v23.0.zip &&
mv /tmp/ora2pg* /tmp/ora2pg &&
(cd /tmp/ora2pg && perl Makefile.PL && make && make install)

RUN mkdir /sql
RUN mkdir /zip
RUN mkdir /tmp/generated_ddl

    # prepare config
    ENV HOST=host
    ENV PORT=port
    ENV SERVICE_NAME=service_name
    ENV USER=user
    ENV PASSWORD=password
    ENV SCHEMA=schema

get a error in Step 6

i use win10+vbox+boot2docker.iso

when i build, get a error in step 6:

docker@default:~$ docker build . -t ora2pg
Sending build context to Docker daemon 20.48kB
Step 1/23 : FROM perl:slim
---> 327e48466da5
Step 2/23 : ARG ORA2PG_VERSION=19.0
---> Using cache
---> 66f5dc3d44f4
Step 3/23 : RUN mkdir -p /usr/share/man/man1 && mkdir -p /usr/share/man/man7
---> Using cache
---> 73a3935d2563
Step 4/23 : RUN apt update && apt install -y unzip rpm alien libaio1 postgresql-client libdbi-perl bzip2
---> Using cache
---> 7d2bbb8bf8ca
Step 5/23 : RUN curl -L -o /tmp/ora2pg.zip https://github.com/darold/ora2pg/archive/v$ORA2PG_VERSION.zip && (cd /tmp && unzip ora2pg.zip && rm -f ora2pg.zip) && mv /tmp/ora2pg* /tmp/ora2pg && (cd /tmp/ora2pg && perl Makefile.PL && make && make install)
---> Using cache
---> 0b121a6e1b3a
Step 6/23 : ADD /assets /assets
ADD failed: stat /mnt/sda1/var/lib/docker/tmp/docker-builder457884445/assets: no such file or directory

FATAL: 12541 ... ORA-12541: TNS:no listener (DBD ERROR: OCIServerAttach)

Tried following the steps and run the docker on local, having oracle DB connected on Docker and used the credentials of docker in ora2pg.config. Oracle is up and when Im trying to setup ORA2PG getting TNS issue. (FATAL: 12541 ... ORA-12541: TNS:no listener (DBD ERROR: OCIServerAttach)) Tried multiple means modified TNS file made it appropriative nothing seems to be working. Oracle connection is in a good condition.

DB connection TNS:no listener - configuring oracle client configuration information

If Oracle, Postgresql and ora2pg are all in their own stack docker containers, ora2pg couldnt identify the path to translate the Oracle DBI connection or if in the normal scenario is the tnsnames.ora. Entering the tnsnames.ora at oracleclient/network/admin path within the ora2pg docker also doesnt resolve the solution. The db however is reachable from any sqlclient like dbeaver from the host PC

Trying to connect to database: dbi:Oracle:host=localhost;sid=orcl;port=1521
DBI connect('host=localhost;sid=orcl;port=1521','mydb',...) failed: ORA-12541: TNS:no listener (DBD ERROR: OCIServerAttach) at /usr/local/lib/perl5/site_perl/5.32.0/Ora2Pg.pm line 1624.
FATAL: 12541 ... ORA-12541: TNS:no listener (DBD ERROR: OCIServerAttach)

ora2pg.conf not updated with each release

the ora2pg.conf file you provided is not consistent with the conf file generated by ora2pg in the Make script. There are a few differences between what you provide(and it's available in the docker container) and what is in the current version of ora2pg.

It would be great if it could be updated as it gets build.

Error with missing library

With oracle 12g and PostgreSQL 11

The export of data works fine but :
When trying to do a direct COPY from oracle to postgreSQL, a have the following error :

install_driver(Pg) failed: Can't locate DBD/Pg.pm in @INC (you may need to install the DBD::Pg module) (@INC contains: /usr/local/lib/perl5/site_perl/5.28.1/x86_64-linux-gnu /usr/local/lib/perl5/site_perl/5.28.1 /usr/local/lib/perl5/vendor_perl/5.28.1/x86_64-linux-gnu /usr/local/lib/perl5/vendor_perl/5.28.1 /usr/local/lib/perl5/5.28.1/x86_64-linux-gnu /usr/local/lib/perl5/5.28.1) at (eval 17) line 3.
Perhaps the DBD::Pg perl module hasn't been fully installed,
or perhaps the capitalisation of 'Pg' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Mem, Oracle, Proxy, Sponge.
 at /usr/local/lib/perl5/site_perl/5.28.1/Ora2Pg.pm line 1854.
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::Oracle::db handle (DESCRIPTION=(ADDRESS=(HOST=192.168.0.103)(PROTOCOL=tcp)(PORT=1521))(CONNECT_DATA=(SID=UATKPIBX))) at /usr/local/lib/perl5/5.28.1/Carp.pm line 291.

The solution is to add a library libpq-dev in the Dockerfile like this :

RUN apt update && apt install -y unzip rpm alien \
        libaio1 \
        # Install postgresql
        postgresql-client \
        #install Perl Database Interface
        libdbi-perl \
        bzip2 \
        libpq-dev

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.