Oracle DB - Sync Schema failing

Hi,

I have a problem when trying to sync the metadata/tables for our Oracle DB.
It gives the following error in the logs, when trying to call the getTables method in the oracle jdbc driver.

Error running sync step: ORA-01424: missing or illegal character following the escape character

Any ideas how to fix? What SQL command is it trying to run here?
I’m using the latest Oracle JDBC driver version, and also tried an older version. Same problem.

LOG:

2019-11-11 14:51:07,504 [clojure-agent-send-off-pool-4] INFO metabase.sync.util - STARTING: Sync metadata for oracle Database 2 ‘MYDB’
2019-11-11 14:51:07,504 [clojure-agent-send-off-pool-4] INFO metabase.driver - Initializing driver :oracle…
2019-11-11 14:51:07,505 [clojure-agent-send-off-pool-4] INFO metabase.plugins.classloader - Added URL file:/D:/metabase/plugins/oracle.metabase-driver.jar to classpath
2019-11-11 14:51:07,505 [clojure-agent-send-off-pool-4] DEBUGmetabase.plugins.init-steps - Loading plugin namespace metabase.driver.oracle…
2019-11-11 14:51:07,533 [clojure-agent-send-off-pool-4] INFO metabase.driver - Registered driver :oracle (parents: [:sql-jdbc])
2019-11-11 14:51:07,676 [clojure-agent-send-off-pool-4] DEBUGmetabase.plugins.jdbc-proxy - Registering JDBC proxy driver for class oracle.jdbc.OracleDriver…
2019-11-11 14:51:07,680 [clojure-agent-send-off-pool-4] INFO metabase.sync.util - STARTING: step ‘sync-timezone’ for oracle Database 2 ‘MYDB’
2019-11-11 14:51:08,190 [clojure-agent-send-off-pool-4] INFO metabase.sync.util - FINISHED: step ‘sync-timezone’ for oracle Database 2 ‘MYDB’ (509.6 ms)
2019-11-11 14:51:08,191 [clojure-agent-send-off-pool-4] INFO metabase.sync.util - STARTING: step ‘sync-tables’ for oracle Database 2 ‘MYDB’
2019-11-11 14:51:15,676 [clojure-agent-send-off-pool-4] ERRORmetabase.sync.util - Error running sync step: ORA-01424: missing or illegal character following the escape character

(“oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:509)”
“oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:461)”
“oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1104)”
“oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:550)”
“oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:268)”
“oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:655)”
“oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:270)”
“oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:91)”
“oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:807)”
“oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:983)”
“oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)”
“oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3666)”
“oracle.jdbc.driver.T4CPreparedStatement.executeInternal(T4CPreparedStatement.java:1426)”
“oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3713)”
“oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1167)”
“oracle.jdbc.OracleDatabaseMetaData.getTables(OracleDatabaseMetaData.java:2767)”
“com.mchange.v2.c3p0.impl.NewProxyDatabaseMetaData.getTables(NewProxyDatabaseMetaData.java:3010)”
“–> driver.sql_jdbc.sync$get_tables.invokeStatic(sync.clj:90)”
“driver.sql_jdbc.sync$get_tables.invoke(sync.clj:86)”
“driver.sql_jdbc.sync$fast_active_tables$iter__67166__67172$fn__67173.invoke(sync.clj:106)”
“driver.sql_jdbc.sync$fast_active_tables.invokeStatic(sync.clj:105)”
“driver.sql_jdbc.sync$fast_active_tables.doInvoke(sync.clj:94)”
“driver.sql_jdbc.sync$fn__67121.invokeStatic(sync.clj:35)”
“driver.sql_jdbc.sync$fn__67121.invoke(sync.clj:34)”
“driver.sql_jdbc.sync$describe_database.invokeStatic(sync.clj:189)”
“driver.sql_jdbc.sync$describe_database.invoke(sync.clj:185)”
“driver.sql_jdbc$fn__67844.invokeStatic(sql_jdbc.clj:50)”
“driver.sql_jdbc$fn__67844.invoke(sql_jdbc.clj:49)”
“sync.fetch_metadata$fn__50432$db_metadata__50437$fn__50438.invoke(fetch_metadata.clj:13)”
“sync.fetch_metadata$fn__50432$db_metadata__50437.invoke(fetch_metadata.clj:10)”
“sync.sync_metadata.tables$fn__51900$db_metadata__51905$fn__51906.invoke(tables.clj:146)”
“sync.sync_metadata.tables$fn__51900$db_metadata__51905.invoke(tables.clj:143)”
“sync.sync_metadata.tables$fn__51961$sync_tables_BANG___51966$fn__51967.invoke(tables.clj:163)”
“sync.sync_metadata.tables$fn__51961$sync_tables_BANG___51966.invoke(tables.clj:158)”
“sync.util$fn__42333$run_step_with_metadata__42338$fn__42342$fn__42344.invoke(util.clj:356)”
“sync.util$with_start_and_finish_logging_STAR_.invokeStatic(util.clj:104)”
“sync.util$with_start_and_finish_logging_STAR_.invoke(util.clj:98)”
“sync.util$with_start_and_finish_debug_logging.invokeStatic(util.clj:121)”
“sync.util$with_start_and_finish_debug_logging.invoke(util.clj:118)”
“sync.util$fn__42333$run_step_with_metadata__42338$fn__42342.invoke(util.clj:353)”
“sync.util$fn__42333$run_step_with_metadata__42338.invoke(util.clj:348)”
“sync.util$fn__42525$run_sync_operation__42530$fn__42531$fn__42532.invoke(util.clj:441)”
“sync.util$fn__42525$run_sync_operation__42530$fn__42531.invoke(util.clj:441)”
“sync.util$fn__42525$run_sync_operation__42530.invoke(util.clj:435)”
“sync.sync_metadata$fn__52014$sync_db_metadata_BANG___52019$fn__52020$fn__52021.invoke(sync_metadata.clj:51)”
“sync.util$do_with_error_handling.invokeStatic(util.clj:149)”
“sync.util$do_with_error_handling.invoke(util.clj:144)”
“sync.util$do_with_error_handling.invokeStatic(util.clj:147)”
“sync.util$do_with_error_handling.invoke(util.clj:144)”
“driver$fn__20223.invokeStatic(driver.clj:673)”
“driver$fn__20223.invoke(driver.clj:673)”
“sync.util$sync_in_context$fn__42239.invoke(util.clj:140)”
“sync.util$with_db_logging_disabled$fn__42236.invoke(util.clj:131)”
“sync.util$with_start_and_finish_logging_STAR_.invokeStatic(util.clj:104)”
“sync.util$with_start_and_finish_logging_STAR_.invoke(util.clj:98)”
“sync.util$with_start_and_finish_logging$fn__42225.invoke(util.clj:116)”
“sync.util$with_sync_events$fn__42220.invoke(util.clj:90)”
“sync.util$with_duplicate_ops_prevented$fn__42211.invoke(util.clj:69)”
“sync.util$do_sync_operation.invokeStatic(util.clj:168)”
“sync.util$do_sync_operation.invoke(util.clj:165)”
“sync.sync_metadata$fn__52014$sync_db_metadata_BANG___52019$fn__52020.invoke(sync_metadata.clj:50)”
“sync.sync_metadata$fn__52014$sync_db_metadata_BANG___52019.invoke(sync_metadata.clj:47)”
“api.database$fn__52688$fn__52690.invoke(database.clj:521)”)

2019-11-11 14:51:15,677 [clojure-agent-send-off-pool-4] INFO metabase.sync.util - FINISHED: Sync metadata for oracle Database 2 ‘MYDB’ (8.2 s)

Hi @gregluk
Which version of Metabase?
Which ojdbc version are you specifically using?
Which version of Java? java -version
Do you know which column/table it fails on? Might be able to see something in the Oracle log. It would be great if we could find a way to reproduce the problem, then it’s a lot easier to fix.