Skip to Main Content

SQL Developer Data Modeler

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Not able to connect MS SQL Server 2019 using JDBC driver

Sagar ViradiyaJun 12 2024

While connecting SQL Server in Data modeler tool using JDBC url, I am getting following error

com.microsoft.sqlserver.jdbc.SQLServerException: "encrypt" property is set to "true" and "trustServerCertificate" property is set to "false" but the driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption: Error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.

I have followed following steps, so let me know if I am missing any steps:

  1. Downloaded JDBC driver 12.6 from https://go.microsoft.com/fwlink/?linkid=2272555
  2. In Data modeler, Add new JDBC driver; **Tools>Preferences>Data Modler>Third Party JDBC Drivers>Clicking + Icon ** and browse .jar file
    “C:\Program Files\Microsoft JDBC DRIVER 12.6 for SQL Server\sqljdbc_12.6\enu\jars\mssql-jdbc-12.6.2.jre11.jar”
  3. Now I go to File>Import> Data Dictionary>Add connection>Select Database Type:JDBC
    Add all details which are required in form
  4. JDBC URL = jdbc:sqlserver://;serverName=MyServerName;databaseName=MyDatabase;trustServerCertificate=true
  5. Driver Class = com.microsoft.sqlserver.jdbc.SQLServerDriver
  6. Database Type = SQL Sever

After adding all details, Click on Test Connection.

Is there any issue configuring JDBC driver? or is there any issue in version of SQL Server and JDBC?

Comments

thatJeffSmith-Oracle Feb 13 2025

Your ENTRA users will get authenticated via JSON Web Tokens, and their Entra roles will determine which ORDS REST APIs they can hit.

When they hit an endpoint, it'll execute code in the database as the database user that owns the schema where the REST API is defined, not as Entra defiend end user. In fact, the Entra users won't have accounts in the database (they could, but wont' need to).

The :current_user field as far as ords is concerned would be the corresponding oauth2 client or JWT issued for the authorizied session.

Your prehook should be able to alter the session to set the context that would put your RLS/VPD security policy in play.

1 - 1

Post Details

Added on Jun 12 2024
1 comment
903 views