risingwavelabs/risingwave · error · ConnectorError

Sql Server table ' '.' ' not found in

Error message

Sql Server table '{}'.'{}' not found in '{}'

What it means

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.

Solutions

  1. Verify the table exists with `SELECT * FROM <db>.INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = '<table>'` and confirm schema/database names in the config.
  2. Qualify the name correctly, including the schema (`dbo.orders`), in the CDC source options.
  3. Grant the CDC login `SELECT`/metadata visibility permissions on the schema and table.
  4. Check the table wasn't renamed/dropped, and re-create the source pointing at the right table.

Example fix

// before (wrong schema)
WITH (connector = 'sqlserver-cdc', database_name = 'ShopDb', schema_name = 'sales', table_name = 'orders');
// after
WITH (connector = 'sqlserver-cdc', database_name = 'ShopDb', schema_name = 'dbo', table_name = 'orders');
Defensive patterns

Strategy: validation

Validate before calling

-- Verify the table is visible before configuring the source
SELECT COUNT(*) FROM <db>.INFORMATION_SCHEMA.COLUMNS
 WHERE TABLE_SCHEMA = '<schema>' AND TABLE_NAME = '<table>';
-- result must be > 0

Try / catch

match connector.connect(config).await {
    Err(e) if e.to_string().contains("not found in") => {
        // verify schema/table/database names and permissions, then retry
    },
    r => r?,
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/0cf9205d5ccecaec. Report an issue: GitHub.

Appendix: source

Thrown at src/connector/src/source/cdc/external/sql_server.rs:164

                    tc.TABLE_SCHEMA = '{}' AND tc.TABLE_NAME = '{}'",
                config.schema, config.table,
            ));

            let mut stream = sql.query(&mut client.inner_client).await?;
            while let Some(item) = stream.try_next().await? {
                match item {
                    QueryItem::Metadata(_) => {}
                    QueryItem::Row(row) => {
                        let pk_name: &str = row.try_get(0)?.unwrap();
                        pk_names.push(pk_name.to_owned());
                    }
                }
            }
        }

        // The table does not exist
        if column_descs.is_empty() {
            bail!(
                "Sql Server table '{}'.'{}' not found in '{}'",
                config.schema,
                config.table,
                config.database
            );
        }

        Ok(Self {
            column_descs,
            pk_names,
        })
    }

    pub fn column_descs(&self) -> &Vec<ColumnDesc> {
        &self.column_descs
    }

    pub fn pk_names(&self) -> &Vec<String> {

View on GitHub (pinned to 6469eb736d)