{"record":{"id":"018d22a774aa5750","repo":"apache/seatunnel","slug":"the-following-configured-db2-tables-are-not-enable","errorCode":null,"errorMessage":"The following configured DB2 tables are not enabled for capture: ${String.join(\", \", missingTables)}","messagePattern":"The following configured DB2 tables are not enabled for capture: (.+?)","errorType":"exception","errorClass":"SeaTunnelException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-db2/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/db2/utils/TableDiscoveryUtils.java","lineNumber":80,"sourceCode":"     */\n    public static void validateExplicitCaptureTables(\n            List<String> configuredTables, List<TableId> capturedTableIds) {\n        if (configuredTables == null || configuredTables.isEmpty()) {\n            return;\n        }\n\n        Set<TableId> normalizedCapturedTables =\n                capturedTableIds.stream()\n                        .map(TableDiscoveryUtils::normalizeCapturedTableId)\n                        .collect(Collectors.toSet());\n        List<String> missingTables = new ArrayList<>();\n        for (String configuredTable : configuredTables) {\n            if (!normalizedCapturedTables.contains(toConfiguredDb2TableId(configuredTable))) {\n                missingTables.add(configuredTable);\n            }\n        }\n        if (!missingTables.isEmpty()) {\n            throw new SeaTunnelException(\n                    \"The following configured DB2 tables are not enabled for capture: \"\n                            + String.join(\", \", missingTables));\n        }\n    }\n\n    /**\n     * Db2 Debezium metadata always uses an empty catalog because one connector instance captures a\n     * single configured database. Explicit SeaTunnel table names still carry the database segment,\n     * so startup validation needs to drop that catalog part before comparing with capture tables.\n     */\n    static TableId toConfiguredDb2TableId(String configuredTable) {\n        int firstDot = configuredTable.indexOf('.');\n        int secondDot = configuredTable.indexOf('.', firstDot + 1);\n        if (firstDot < 0 || secondDot < 0 || secondDot == configuredTable.length() - 1) {\n            throw new SeaTunnelException(\n                    \"DB2 CDC table-names must use database.schema.table format, but found: \"\n                            + configuredTable);\n        }","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-cdc/connector-cdc-db2/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/db2/utils/TableDiscoveryUtils.java#L62-L98","documentation":"TableDiscoveryUtils.validateExplicitCaptureTables compares the user-configured table list against the tables actually enabled for DB2 capture (registered with the ASN capture service). If any configured table is missing from the capture set, it throws SeaTunnelException listing the missing tables.","triggerScenarios":"Starting the CDC source with table-names that exist but are not in ASN capture: capture not registered for the table, table added after capture instance creation, or schema/name case mismatch between config and captured set.","commonSituations":"Forgot to run ASNCDC.ADDTABLE for the table; capture service not restarted after adding tables; config uses lowercase while capture metadata is uppercase; wrong schema qualifier in table-names.","solutions":["Register the table for capture: CALL ASNCDC.ADDTABLE('<schema>','<table>') and restart the ASN capture service","Match identifier case in table-names to DB2 metadata (usually uppercase)","Verify captured tables: SELECT * FROM ASNCDC.IBMSNAP_REGISTER","Check the schema qualifier in the configured table-names is correct"],"exampleFix":"// before: table configured but never added to capture\ntable-names = [\"MYDB.MYSCHEMA.MYTABLE\"]\n// after: register first, then run\nCALL ASNCDC.ADDTABLE('MYSCHEMA', 'MYTABLE');\nCALL ASNCDC.START();","handlingStrategy":"validation","validationCode":"// Confirm every configured table is captured before starting the job\nSELECT SOURCE_OWNER, SOURCE_TABLE FROM ASNCDC.IBMSNAP_REGISTER; -- compare against table-names","typeGuard":null,"tryCatchPattern":"try { sourceFactory.createSource(...); } catch (SeaTunnelException e) { if (e.getMessage().contains(\"not enabled for capture\")) { /* register missing tables via ASNCDC.ADDTABLE */ } throw e; }","preventionTips":["Run ASNCDC.ADDTABLE + restart capture for every table in table-names","Keep identifier case consistent (uppercase for DB2)","Re-validate capture registration after adding new tables"],"tags":["db2","cdc","capture","config"],"backgroundTag":"invalid-config-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}