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
1.01k stars 342 forks source link

Improved execution results of Ora2Pg #1587

Closed yano-rxa closed 1 year ago

yano-rxa commented 1 year ago

Mr.Darold

Thanks for the feedback.

We considered source correction strategies based on the your feedback received before. We are analyzing the conversion target using Ora2Pg, and we need to count the number of conversion successes and failures in the target, so we would like this correction to be incorporated.

We think of adding the following fixes to the current source of Ora2Pg (source of V23.2) to realize the functionality. What do you think?

*lib\ora2pg In order to display the conversion result ("success" or "failure"), modify the object from the following aspects:

Add a process to record a list of failures due to "Oracle-only/unique pattern".
Add a process to extract the list to be converted from the ALL_OBJECTS and record the conversion success list and the conversion failure list.

The functions to be modified are as follows.   sub export_function sub export_view   sub export_mview   sub export_grant sub export_sequence   sub export_dblink   sub export_directory   sub export_trigger   sub export_procedure   sub export_package   sub export_type   sub export_tablespace   sub export_kettle   sub export_partition   sub export_synonym   sub export_table After modification, the "-t" option must be specified to display the conversion result of the object.

The execution example is as follows. Execution example: ora2pg -c ora2pg.conf -o pg_table.sql -t table

[========================>] 31/31 tables (100.0%) end of scanning. [========================>] 31/31 tables (100.0%) end of table export. OUTPUT_DIR: **** Migration information **** TABLE: 29 Migration source 53 Total number of objects:53 Number of successes:29 Number of failures:2 Number of ignores:22 List of objects that could be migrated TABLE 1.AAAAA
: 29: ZZZZZ List of objects that could not be migrated TABLE 1.XXXXX ERROR:Failed to export unique index [idx1] from [XXXXX]
2.YYYYY ERROR:Failed to export unique index [idx2] from [YYYYY]
List of objects that be ignored
TABLE

  1. AAAA$
    :
  2. MLOG$_AAA
darold commented 1 year ago

Is there is any pull request about this feature addon?