dbt-sqlserver icon indicating copy to clipboard operation
dbt-sqlserver copied to clipboard

add TrustServerCertificate to Windows login

Open bsalerno opened this issue 3 years ago • 1 comments

ODBC Driver 18 for SQL Server gives the following database error when compiling and needs this in the connection string. Tested locally with both Drivers 17 and 18.

Database Error ('08001', '[08001] [Microsoft][ODBC Driver 18 for SQL Server]SSL Provider: The certificate chain was issued by an authority that is not trusted.\r\n (-2146893019) (SQLDriverConnect); [08001] [Microsoft][ODBC Driver 18 for SQL Server]Client unable to establish connection (-2146893019); [08001] [Microsoft][ODBC Driver 18 for SQL Server]Invalid connection string attribute (0)')

bsalerno avatar Jul 12 '22 16:07 bsalerno

ah! this solves #219 -- thanks @bsalerno!

note for future -- we should probably start testing using both version 17 and 18 of the driver

dataders avatar Jul 12 '22 16:07 dataders

Thank you @bsalerno, really appreciated! I implemented this in 49e67ed so that we are sure that the property is only added to the connection string in a single place (a few lines below).

sdebruyn avatar Sep 13 '22 20:09 sdebruyn

Sorry, coming back on my decision here. I've read more about why this change was introduced in the driver itself and I've reflected this in the default settings for this adapter. Details about how these changes might affect you are in the CHANGELOG and will be added to the official docs.

sdebruyn avatar Sep 13 '22 20:09 sdebruyn