From 23e87bb9b14a4d3512520409a0a822f9182a6669 Mon Sep 17 00:00:00 2001 From: dat-a-man <98139823+dat-a-man@users.noreply.github.com> Date: Sat, 31 Aug 2024 12:11:09 +0000 Subject: [PATCH] Added info to troubleshooting --- .../dlt-ecosystem/verified-sources/sql_database.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/website/docs/dlt-ecosystem/verified-sources/sql_database.md b/docs/website/docs/dlt-ecosystem/verified-sources/sql_database.md index c89a63a524..97d1e5bba4 100644 --- a/docs/website/docs/dlt-ecosystem/verified-sources/sql_database.md +++ b/docs/website/docs/dlt-ecosystem/verified-sources/sql_database.md @@ -559,11 +559,19 @@ sources.sql_database.credentials="mssql+pyodbc://loader:loader@localhost/dlt_dat sources.sql_database.credentials="mssql+pyodbc://loader:loader@localhost/dlt_data?TrustServerCertificate=yes&driver=ODBC+Driver+17+for+SQL+Server" ``` -***To use long strings (>8k) and avoid collation errors**: +**To use long strings (>8k) and avoid collation errors**: ```toml sources.sql_database.credentials="mssql+pyodbc://loader:loader@localhost/dlt_data?LongAsMax=yes&driver=ODBC+Driver+17+for+SQL+Server" ``` +**To fix MS SQL Server connection issues with ConnectorX**: + +To fix connection issues with ConnectorX and MS SQL Server, include both `Encrypt=yes` and `encrypt=true` in your connection string: +```py +sources.sql_database.credentials="mssql://user:password@server:1433/database?driver=ODBC+Driver+17+for+SQL+Server&Encrypt=yes&encrypt=true" +``` +This approach can help resolve connection-related issues. + ## Customizations ### Transform the data in Python before it is loaded