How to connect to SQL Server using JDBC Driver, with the user as myDomain\myUser, from Linux without DotNet?

Renato Battaglia 0 Reputation points
2024-10-30T13:58:35.2566667+00:00

How to connect to SQL Server using JDBC Driver, with the user as myDomain\myUser, from Linux without DotNet?

  • JDBC driver .jar file being used is mssql-jdbc-12.8.1.jre8.jar
  • MS SQL Server version being used is 16
  • Requires encryption = true
  • The computer trying to connect to the SQL Server is a Linux box without any DotNet infrastructure

PS: (edited, fixed user in this question from myUser\myDomain to myDomain\myUser)

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,970 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. LiHongMSFT-4306 27,961 Reputation points
    2024-10-31T03:23:26.3+00:00

    Hi @Renato Battaglia

    Please check this article for detailed steps: Microsoft SQL Server JDBC for Linux.

    Best regards,

    Cosmog


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


  2. Olaf Helper 45,096 Reputation points
    2024-11-01T09:40:25.0333333+00:00

    with the user as myDomain\myUser

    If the Linux server is joined to a domain, then you can use the connection string property "integratedSecurity", see

    https://learn.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver16

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.