Troubleshooting Microsoft SQL Server (MSSQL) Sources
Connector Limitations
Adding columns to existing tables with CDC
When using SQL Server (MSSQL) in CDC mode, adding new columns to existing tables using ALTER TABLE <table> ADD <column>
will not automatically be captured by the CDC stream. As a result, the column will be excluded from CDC tracking
(while it might appear in the Schema section, it will return zero records). To ensure the column is tracked,
we recommend disabling and re-enabling CDC on the table. This will create a new capture instance that reflects
the updated structure and includes the new column:
- Disabling CDC on the table:
EXEC sys.sp_cdc_disable_table
@source_schema = N'<schema>',
@source_name = N'<table>',
@capture_instance = N'<capture instance (typically schema_table)>'
- Enabling CDC on the table:
EXEC sys.sp_cdc_enable_table
@source_schema = N'<schema>',
@source_name = N'<table>',
@role_name = NULL
Note: You may want to set a @role_name or any other arguments similarly to how they were set when CDC was enabled in the first place.
- (Optional) Validate that all columns are being captured:
EXEC sys.sp_cdc_get_captured_columns
@capture_instance = N'<capture instance (typically schema_table)>';
SSH tunnel limitation (Azure SQL Managed Instance)
This limitation applies only to Azure SQL Managed Instance. Azure SQL Database can connect through an SSH tunnel normally.
Error
Connections to an Azure SQL Managed Instance through an SSH tunnel may fail the source's connection check with one of the following errors:
Error code: 40532; Cannot open server "localhost" requested by the login. The login failed.Login failed for user '<user>@<instance-name>'.(when the username includes an@instance-namesuffix)
Cause
Azure SQL Managed Instance requires the instance hostname to route connections correctly. When Airbyte connects through
an SSH tunnel, the connection uses localhost instead of the Managed Instance hostname, causing the login to fail.
The <user>@<instance-name> workaround supported by Azure SQL Database does not apply to Azure SQL Managed Instance.
Workaround
Connect without a tunnel, using the Managed Instance public endpoint:
- In the Azure portal, enable the public endpoint on your Managed Instance (Security > Networking). The hostname should look like this:
<instance-name>.public.<dns-zone>.database.windows.net. - In the network security group attached to the Managed Instance subnet, add an inbound rule allowing TCP port 3342 from Airbyte's IP addresses only.
- In the Airbyte source configuration, use the following settings:
- Port: 3342 (the public endpoint does not use 1433)
- SSH Tunnel Method: No Tunnel
- Username: A plain SQL username without an @instance suffix