Error: Change Data Capture Is Enabled on the Database, but No Tables Are Queryable
Issue
While setting up a connection, the following error appears:
Unable to validate replication config. Change Data Capture is enabled on the database, but no tables are queryable by user <user_name>.
Environment
Connector: SQL Server
Resolution
To resolve this issue, do the following:
- In SQL Server, verify that the Fivetran user has been granted SELECT permission for the tables you want to sync. For more information, see the Grant user permissions section of our SQL Server setup guide.
- Ensure change data capture (CDC) is enabled for each table you want to integrate. Use the following command, replacing the
<schema>
,<table>
, and<username>
placeholders:EXEC sys.sp_cdc_enable_table @source_schema = [<schema>], @source_name = [<table>], @role_name = [<username>]; @supports_net_changes = 0;
For more information, see the CDC section of our SQL Server setup guide.
Cause
This issue may occur due to either of the following reasons:
- The database user doesn't have the permission required to query or access the applicable tables.
- CDC is not enabled for the applicable tables.