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
978 stars 341 forks source link

PARALLEL copy support PK type varchar2 ? #1749

Closed jasonchenTJ closed 3 months ago

jasonchenTJ commented 3 months ago

Hi Darold,

am trying to sync a table by parameter -J 4 , am config the parameter as below:

DEFINED_PK act_ge_bytearray_hist2:to_number(_ID)

The data type of PK _ID on source oracle is varchar2 , am try to added function "to_number" to convert the type to number.

But seems not working and get error as below:

FATAL: ORA-00911: invalid character (DBD ERROR: error possibly near <> indicator at char 192 in 'SELECT "ID","REV","NAME_","DEPLOYMENTID",CASE WHEN dbmslob.getlength("BYTES") = 0 THEN NULL ELSE "BYTES" END,"GENERATED" FROM "HSIS"."ACT_GE_BYTEARRAY_HIST2" a WHERE ABS(MOD(to_number(<>_id), 4)) = :p1')

Thanks Jason

jasonchenTJ commented 3 months ago

Sorry Bro!It works! am setting up incorrect column name :) your tools is awesome!