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

ORA-00942 error with "-t TEST_COUNT" if Oracle table needs to be quoted #1612

Closed simonpane closed 1 year ago

simonpane commented 1 year ago

Oracle requires double quotation marks as the quoted identifier for any object that was created with case-sensitivity (and hence cannot be referenced in upper case).

Oracle documentation reference: https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/Database-Object-Names-and-Qualifiers.html#GUID-75337742-67FD-4EC0-985F-741C93D918DA

Ora2Pg when run with the --type TEST_COUNT option is generating an error for Oracle source tables created with case-sensitivity:

FATAL: ORA-00942: table or view does not exist (DBD ERROR: error possibly near <*> indicator at char 32 in 'SELECT COUNT(*) FROM MY_SCHEMA.<*>my_table')

Need to adjust subroutine _count_source_rows to use Oracle quoted identifiers for compatibility with case-sensitive Oracle table names.

simonpane commented 1 year ago

PR with fix is forthcoming.