darold / ora2pg

Ora2Pg is a free tool used to migrate an Oracle database to a PostgreSQL compatible schema. It connects your Oracle database, scan it automatically and extracts its structure or data, it then generates SQL scripts that you can load into PostgreSQL.
http://www.ora2pg.com/
GNU General Public License v3.0
991 stars 342 forks source link

problem during execution of ora2pg -t TEST -c config/ora2pg.conf > migration_diff.txt #1630

Closed franxav06 closed 1 year ago

franxav06 commented 1 year ago

Hello

I have migrated a schema oracle to as schema postgresql called fdt-mig-dev (with two hyphens), that is certainly a bad idea but I cannot rename it. Luckily everything worked perfectly, I was able to migrate all the objects, but when I start

ora2pg -t TEST -c config/ora2pg.conf > migration_diff.txt, I have the following error :

DBD::Pg::st execute failed: ERROR: relation ""fdt-mig-dev".actor_seq" does not exist LINE 1: ...ECT '"""fdt-mig-dev""".actor_seq',last_value FROM """fdt-mig...

Thanks in advance for your help

Francesco

franxav06 commented 1 year ago

Hello In order to solve this problem I have modified line 17683 in Ora2Pg.pm as follows :

from :

FOR seq_name in SELECT quote_ident(relnamespace::regnamespace::text)||'.'||quote_ident(relname::text) FROM pg_class c .....

to

FOR seq_name in SELECT relnamespace::regnamespace::text||'.'||quote_ident(relname::text) FROM pg_class c .....

Kind regards

Francesco

darold commented 1 year ago

Great! Thanks, commit 5b94db1 applies your patch.