{"record":{"id":"93342edabeae94b5","repo":"apache/seatunnel","slug":"sql-execute-error-sql","errorCode":null,"errorMessage":" SQL execute error, sql:{}","messagePattern":" SQL execute error, sql:(.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-oracle/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/oracle/utils/OracleConnectionUtils.java","lineNumber":153,"sourceCode":"\n        Set<TableId> tableIdSet = new HashSet<>();\n        String queryTablesSql =\n                \"SELECT OWNER ,TABLE_NAME,TABLESPACE_NAME FROM ALL_TABLES \\n\"\n                        + \"WHERE PARTITIONED = 'YES' OR (TABLESPACE_NAME IS NOT NULL AND TABLESPACE_NAME NOT IN ('SYSAUX'))\";\n\n        try {\n            jdbcConnection.query(\n                    queryTablesSql,\n                    rs -> {\n                        while (rs.next()) {\n                            String schemaName = rs.getString(1);\n                            String tableName = rs.getString(2);\n                            TableId tableId = new TableId(database, schemaName, tableName);\n                            tableIdSet.add(tableId);\n                        }\n                    });\n        } catch (SQLException e) {\n            LOG.warn(\" SQL execute error, sql:{}\", queryTablesSql, e);\n        }\n\n        for (TableId tableId : tableIdSet) {\n            if (tableFilters.dataCollectionFilter().isIncluded(tableId)) {\n                capturedTableIds.add(tableId);\n                LOG.info(\"\\t including '{}' for further processing\", tableId);\n            } else {\n                LOG.debug(\"\\t '{}' is filtered out of capturing\", tableId);\n            }\n        }\n\n        return capturedTableIds;\n    }\n}\n","sourceCodeStart":135,"sourceCodeEnd":168,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-cdc/connector-cdc-oracle/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/oracle/utils/OracleConnectionUtils.java#L135-L168","documentation":"OracleConnectionUtils.listTables() catches SQLException from the table-listing query and logs it at WARN level (' SQL execute error, sql:{}') instead of throwing. The method continues with whatever tables were collected before the failure, so the connector may silently capture a partial or empty table set.","triggerScenarios":"The query used to enumerate Oracle tables (against ALL_TABLES / dba views) throws SQLException: connection dropped, ORA-00942 insufficient privileges on dictionary views, or DB temporarily unavailable during table discovery.","commonSituations":"CDC user lacks SELECT privilege on the data dictionary views; network blip to Oracle during job startup; wrong database/service name in connection config causing the listing query to fail.","solutions":["Grant the CDC user SELECT on ALL_TABLES (or the relevant dictionary views) so the listing query succeeds.","Verify Oracle connection parameters (url, user, database) and test the same query manually with the CDC account.","Check network/firewall stability between the SeaTunnel worker and Oracle; retry the job after connectivity is restored.","Review the WARN stack trace for the exact ORA- error code and fix the underlying cause."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// before starting the job, verify the CDC user can list tables\ntry (Connection c = DriverManager.getConnection(url, user, pass);\n     PreparedStatement ps = c.prepareStatement(\"SELECT COUNT(*) FROM ALL_TABLES WHERE OWNER = ?\")) {\n    ps.setString(1, schema);\n    try (ResultSet rs = ps.executeQuery()) {\n        rs.next(); // succeeds only if dictionary access is granted\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Grant SELECT on ALL_TABLES / dictionary views to the CDC user","Validate Oracle connectivity and credentials before job start","Monitor for this WARN at startup — a partial table list silently narrows captured tables","Log and compare the discovered table set against expected tables"],"tags":["cdc","oracle","sql","table-discovery","swallowed-exception"],"backgroundTag":"sql-query-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}