Error: Schema Fetch Times Out on Large Databases
Issue
The connector times out during schema discovery. The following error may appear:
java.sql.SQLException: Read timed out while running query
Alternatively, the connection hangs with no schemas visible in the Fivetran dashboard.
Environment
All SQL Server connectors
Resolution
Restrict the Fivetran user's SELECT permissions to only the schemas or tables you want to sync. This limits the scope of Fivetran's metadata scan and prevents the timeout.
Option 1 — Grant SELECT at the schema level (recommended):
GRANT SELECT ON SCHEMA::<schema_name> TO <username>;
Repeat for each schema you want Fivetran to sync.
Option 2 — Grant SELECT at the table level:
GRANT SELECT ON [<schema>].[<table>] TO <username>;
Option 3 — Deny access to schemas you don't need (if a broad grant already exists and cannot be revoked):
DENY SELECT ON SCHEMA::<unwanted_schema> TO <username>;
After adjusting permissions, pause and resume the connection in the Fivetran dashboard to trigger a fresh schema fetch.
Column-level SELECT grants significantly increase the metadata scan cost. Where possible, prefer schema-level or table-level grants over column-level grants.
Cause
During schema discovery, Fivetran queries metadata for all schemas and tables the Fivetran user has SELECT permission on. On instances with a large number of tables — especially when the user has column-level permissions — this metadata query can exceed the connection timeout. Restricting SELECT permissions to only the required schemas or tables reduces the scan scope and resolves the timeout.