Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEST_DATA : ERROR: ORA-00911: caractère non valide #1841

Open
did16 opened this issue Nov 18, 2024 · 5 comments
Open

TEST_DATA : ERROR: ORA-00911: caractère non valide #1841

did16 opened this issue Nov 18, 2024 · 5 comments

Comments

@did16
Copy link

did16 commented Nov 18, 2024

Hi
After completing the migration from Oracle 19 to PostgreSQL 15, I want to compare the data between the source Oracle database and the target PostgreSQL database.
For this, I specified "TYPE TEST_DATA" in the ora2pg.conf file.
I get the following error message :

ERROR: ORA-00911: caractère non valide (DBD ERROR: error possibly near <> indicator at char 211 in 'SELECT "CODE_PARAM_TRAIT_CAT","CODE_TYP_PARAM","CODE_TRAIT_CAT","CODE_ENTR_CAT","CODE_SORT_CAT","NUM_LOI","ID_MATRICE_CAT","ORDRE_PARAM","LIB_PARAM_TRAIT_CAT","DESC_PARAM" FROM "CTR"."PARAM_TRAIT_CAT" a WHERE (1<>=1 # Apply to all tables) ORDER BY 1 FETCH FIRST 10000 ROWS ONLY')
Can't call method "execute" on an undefined value at /usr/local/share/perl5/Ora2Pg.pm line 21376.
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::Oracle::db handle (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(PORT=1521)(HOST=XXXXXX))(CONNECT_DATA=(SID=CTRNAT))) at /usr/local/share/perl5/Ora2Pg.pm line 21376.
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::Oracle::db handle (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(PORT=1521)(HOST=XXXXXXX))(CONNECT_DATA=(SID=CTRNAT))) at /usr/local/share/perl5/Ora2Pg.pm line 21376.
is this a bug ?

Ora2Pg v24.1
<<

@darold
Copy link
Owner

darold commented Nov 18, 2024

Please upgrade to latest development code this have been fixed normally.

@did16
Copy link
Author

did16 commented Nov 20, 2024

Hi
Ora2Pg v24.3

nohup ora2pg -c config/ora2pg.conf > rapport_TEST_DATA

[postgres@dcgyy5eo DEVPATOU2]$ tail -f rapport_TEST_DATA
[2024-11-20 08:31:21] [=========> ] 121/293 tables (41.3%) scanning table PARAM_TRAIT_C[2024-11-20 08:31:21] [==========> ] 131/293 tables (44.7%) scanning table PRELEVEMENT [2024-11-20 08:31:21] [============> ] 151/293 tables (51.5%) scanning table SERIE_EXPLICA[2024-11-20 08:31:21] [=============> ] 161/293 tables (54.9%) scanning table SESS_TRAV_TRA[2024-11-20 08:31:21] [==============> ] 171/293 tables (58.4%) scanning table SYNO_TYP_LIEU[2024-11-20 08:31:21] [=================> ] 211/293 tables (72.0%) scanning table TYP_ETALONNAG[2024-11-20 08:31:21] [==================> ] 221/293 tables (75.4%) scanning table TYP_SCENAR [2024-11-20 08:31:21] [======================> ] 271/293 tables (92.5%) scanning table UTIL_GROUPE_P[2024-11-20 08:31:21] [=======================> ] 281/293 tables (95.9%) scanning table VUE_BASS [2024-11-20 08:31:21] [========================>] 293/293 tables (100.0%) end of scanning.
Result will be written to file data_validation.log
ERROR: ORA-00911: caractère non valide (DBD ERROR: error possibly near <> indicator at char 91 in 'SELECT a."CODE_GROUPE",a."CODE_TYP_ACCES",a."CODE_SITE" FROM "CTR"."GROUPE_SITE" a WHERE (1<>=1 # Apply to all tables) ORDER BY 1,2,3 FETCH FIRST 10000 ROWS ONLY')
Can't call method "execute" on an undefined value at /usr/local/share/perl5/Ora2Pg.pm line 21798.
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::Oracle::db handle (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(PORT=1521)(HOST=pc2yy047.pcy.edf.fr))(CONNECT_DATA=(SID=CTRNAT))) at /usr/local/share/perl5/Ora2Pg.pm line 21798.
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::Oracle::db handle (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(PORT=1521)(HOST=pc2yy047.pcy.edf.fr))(CONNECT_DATA=(SID=CTRNAT))) at /usr/local/share/perl5/Ora2Pg.pm line 21798.
<<
Despite the migration to the latest version (24.3), the issue still persists.

@did16
Copy link
Author

did16 commented Nov 20, 2024

Hi
I have found the following lead:
SELECT a."CODE_GROUPE",a."CODE_TYP_ACCES",a."CODE_SITE"
FROM "CTR"."GROUPE_SITE" a
WHERE (1=1 # Apply to all tables)
ORDER BY 1,2,3 FETCH FIRST 5 ROWS ONLY;
If I remove the comment "# Apply to all tables" in the SQL query, it works.
ora2pg add the comment in the SQL query code ...

@did16
Copy link
Author

did16 commented Nov 22, 2024

Hi
Is it possible to know if a fix is planned for ora2pg regarding the bug I reported about TEST_DATA?
Thanks in advance

@darold
Copy link
Owner

darold commented Nov 22, 2024

No fix are planned, avoid adding comments in the ora2pg.conf setting value is the solution. I know this is default ora2pg.conf but this is just not allowed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants