I can’t create-load data from spark dataframe in databricks to Azure Synapse (DWH)

If the encrypt property is set to true and the trustServerCertificate property is set to false and if the server name in the connection string doesn’t match the server name in the TLS certificate, the following error will occur. As of version 7.2, the driver supports wildcard pattern matching in the left-most label of the server name in the TLS certificate.

("url", "jdbc:sqlserver://cheprasynapse.sql.azuresynapse.net:1433;database=chepra;user={Your_username};password={Your_Password};encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.sql.azuresynapse.net;loginTimeout=30;")

enter image description here

When the encrypt property is set to true and the trustServerCertificate property is set to true, the Microsoft JDBC Driver for SQL Server won’t validate the SQL Server TLS certificate. This is usually required for allowing connections in test environments, such as where the SQL Server instance has only a self signed certificate.

("url", "jdbc:sqlserver://cheprasynapse.sql.azuresynapse.net:1433;database=chepra;user={Your_username};password={Your_Password};encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.sql.azuresynapse.net;loginTimeout=30;")

enter image description here

For more details, refer Connecting with encryption.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top