OS Red Hat Enterprise Linux Server release 7.7
Tool: ora2pg Ora2Pg v23.2
Action: Migrate data from Oracle 12 schema tables to a flat file using ora2pg as below
ora2pg -c config/ora2pg.conf -t COPY --pg_dsn "dbi:Pg:dbname=scratchpad;host=<HOST>;port=5432" > data/data.csv
fails with the following message
ora2pg -c config/ora2pg.conf -t COPY --pg_dsn "dbi:Pg:dbname=scratchpad;host=<HOST>;port=5432" > data/data.csv
[========================>] 54/54 tables (100.0%) end of scanning.
install_driver(Pg) failed: Can't locate DBD/Pg.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at (eval 20) 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, SQLite, Sponge.
A search in Google suggested installing perl-DBD-Pg package (see https://github.com/mikaku/Monitorix/issues/314). First this is what is installed
yum list installed | grep "^perl-DB[ID]"
perl-DBD-SQLite.x86_64 1.39-3.el7 @rhel-7-server-rpms
perl-DBI.x86_64 1.627-4.el7 @rhel-7-server-rpms
Tried to install package
yum install perl-DBD-Pg
get error
No package perl-DBD-Pg available.
Error: Nothing to do
Tried to find work arounds but no luck so fare.
Appreciate any advice. FYI, the schema export from Oracle with ora2pg works fine.
in my case it was an issue with subscription manager to redhat. Resolved