{"record":{"id":"0cf9205d5ccecaec","repo":"risingwavelabs/risingwave","slug":"sql-server-table-not-found-in","errorCode":null,"errorMessage":"Sql Server table '{}'.'{}' not found in '{}'","messagePattern":"Sql Server table '(.+?)'\\.'(.+?)' not found in '(.+?)'","errorType":"exception","errorClass":"ConnectorError","httpStatus":null,"severity":"error","filePath":"src/connector/src/source/cdc/external/sql_server.rs","lineNumber":164,"sourceCode":"                    tc.TABLE_SCHEMA = '{}' AND tc.TABLE_NAME = '{}'\",\n                config.schema, config.table,\n            ));\n\n            let mut stream = sql.query(&mut client.inner_client).await?;\n            while let Some(item) = stream.try_next().await? {\n                match item {\n                    QueryItem::Metadata(_) => {}\n                    QueryItem::Row(row) => {\n                        let pk_name: &str = row.try_get(0)?.unwrap();\n                        pk_names.push(pk_name.to_owned());\n                    }\n                }\n            }\n        }\n\n        // The table does not exist\n        if column_descs.is_empty() {\n            bail!(\n                \"Sql Server table '{}'.'{}' not found in '{}'\",\n                config.schema,\n                config.table,\n                config.database\n            );\n        }\n\n        Ok(Self {\n            column_descs,\n            pk_names,\n        })\n    }\n\n    pub fn column_descs(&self) -> &Vec<ColumnDesc> {\n        &self.column_descs\n    }\n\n    pub fn pk_names(&self) -> &Vec<String> {","sourceCodeStart":146,"sourceCodeEnd":182,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/source/cdc/external/sql_server.rs#L146-L182","documentation":"When connecting to SQL Server for CDC, the connector queries the table's column metadata. If the resulting `column_descs` is empty, the table could not be found in the configured database (or the connector lacks visibility into it), and it bails with this error naming schema, table, and database. It is a not-found validation at connect time.","triggerScenarios":"Calling `SqlServerCdcSplitter::connect` with `config.schema` / `config.table` / `config.database` that resolve to no columns in the upstream SQL Server instance — the metadata query returned no rows.","commonSituations":"Typo in table or schema name; table created in a different database than configured; case sensitivity or schema qualification mistakes (`dbo` vs custom schema); insufficient permissions making the table invisible to the CDC user; table dropped or renamed after source creation.","solutions":["Verify the table exists with `SELECT * FROM <db>.INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = '<table>'` and confirm schema/database names in the config.","Qualify the name correctly, including the schema (`dbo.orders`), in the CDC source options.","Grant the CDC login `SELECT`/metadata visibility permissions on the schema and table.","Check the table wasn't renamed/dropped, and re-create the source pointing at the right table."],"exampleFix":"// before (wrong schema)\nWITH (connector = 'sqlserver-cdc', database_name = 'ShopDb', schema_name = 'sales', table_name = 'orders');\n// after\nWITH (connector = 'sqlserver-cdc', database_name = 'ShopDb', schema_name = 'dbo', table_name = 'orders');","handlingStrategy":"validation","validationCode":"-- Verify the table is visible before configuring the source\nSELECT COUNT(*) FROM <db>.INFORMATION_SCHEMA.COLUMNS\n WHERE TABLE_SCHEMA = '<schema>' AND TABLE_NAME = '<table>';\n-- result must be > 0","typeGuard":null,"tryCatchPattern":"match connector.connect(config).await {\n    Err(e) if e.to_string().contains(\"not found in\") => {\n        // verify schema/table/database names and permissions, then retry\n    },\n    r => r?,\n}","preventionTips":["Copy schema/table/database names directly from SQL Server rather than typing them.","Grant the CDC user metadata visibility on the target schema.","Verify table existence and grants with a test query before source creation."],"tags":["cdc","sqlserver","table-not-found","configuration"],"backgroundTag":"resource-not-found","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}