Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.2.12
-
None
-
Vmware with Oracle Linux 7
Description
Hi all,
I've created two table with engine connect from source Oracle database 12c, but with this simple query the connect engine return the following error:
Connect Engine : Got error 122 'SQLExecDirect: [Oracle][ODBC][Ora]ORA-01000 from Engine
I do not see this error in the Oracle Database logs.
this is the query I launch:
select count(*) from `AG_UBICAZIONE_SLOT` US |
inner join `AG_ATTORE_UBICAZIONE` AUTIR on (AUTIR.PROG_ESERCIZIO_ID=US.PROG_ESERCIZIO_ID OR AUTIR.PROG_MAGAZZINO_ID=US.PROG_MAGAZZINO_ID) |
Queries on individual tables work without problems.
Thanks.
Regards.
I am currently re-installing my computer and Oracle is not yet available. However, to try reproducing this case, please publish your table create statements and possibly the Oracle tables definition and data sample.
Meanwhile, a possible turnover is to define an ODBC table based on a view specified in the SRCDEF option. Something such as:
CREATE TABLE whatever ENGINE=CONNECT TABLE_TYPE=ODBC BLOCK_SIZE=10
CONNECTION='your oracle data source'
SRCDEF='select count(*) from `AG_UBICAZIONE_SLOT` US
inner join `AG_ATTORE_UBICAZIONE` AUTIR on (AUTIR.PROG_ESERCIZIO_ID=US.PROG_ESERCIZIO_ID OR AUTIR.PROG_MAGAZZINO_ID=US.PROG_MAGAZZINO_ID)';
Normally CONNECT should be able to make the colum definition.
The advantage of doing so is to let Oracle do the join and to retrieve only the query result. Sometimes it can be much faster than when MariaDB does the join itself. See Random Access of ODBC Tables for information on what to do when an ODBC table is randomly used, like when joining tables.