Hi Christoffer,
As Marco mentioned you can add an custom configuration to your SQL Server database configuration.
Name: DatabaseJdbcUrl
Value: jdbc:sqlserver://localhost:1433;databaseName=DatabaseName;integratedSecurity=true;encrypt=true;trustServerCertificate=true;
With this setting Microsoft JDBC Driver for SQL Server won't validate the SQL Server TLS certificate.
In Mendix 10.6 + this is enough (https://docs.mendix.com/refguide/custom-settings/)
Configuration/Custom
DatabaseUseSsl false
if you use the custom JDBC the database is not always created.
Hi Christofer,
Can you validate your connection string against this document:
https://learn.microsoft.com/en-us/sql/connect/jdbc/connecting-with-ssl-encryption?view=sql-server-ver16
Or, if unclear, post it in the comments without the actual uri or IP or anything that could reveal sensitive connection information.
Go Make It
Thank you for the answer!
This is what I get with the different connection URLs:
"Opening JDBC connection to localhost:1433/mendix_test_db failed with SQLState: 08S01 Error code: 0 Message: "The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target". ClientConnectionId:7e395ad4-9c08-44aa-992a-2310130f503c"
----
"Opening JDBC connection to jdbc:sqlserver://localhost:1433/mendix_test_db failed with SQLState: 08S01 Error code: 0 Message: "The TCP/IP connection to the host jdbc:sqlserver://localhost, port 1433 has failed. Error: "jdbc:sqlserver://localhost. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall."
----
Hi Guys
I am facing the same issue, I am running Mendix Pro 10.13.1, MSSQL ver 19. I have tried everything above including the url string, but nothing seems to be working. Any help would be appreciated.
I'm using 10.12 & MS SQL Express (localhost default instance).
you can try it, this is works on me.
Database tab change database name to your own DB name
Custom tab create following custom config:
Value (change database name to your own DB name)
jdbc:sqlserver://localhost:1433;databaseName=YOUROWNDBNAME;integratedSecurity=true;encrypt=true;trustServerCertificate=true;
Run your app and will get this popup for the first time to create some tables, click SyncronizeDatabase button
your tables created and Mendix start working on it.
on SSMS