Error "SSL Provider: The target principal name is incorrect." when try to connect to SQL Server from ODBC18 in ssl mode

Sreedhar P 1 Reputation point
2022-09-21T10:32:22.587+00:00

Hi,

I have tried to connect to Microsoft SQL Server in SSL mode from ODBC Driver for SQLServer 18 version.

For that, I have created self-service and rootCA certificates and deployed them in both SQL Server and client machines. When trying to connect, getting the error -
[Microsoft][ODBC Driver 18 for SQL Server]SSL Provider: The target principal name is incorrect.
[Microsoft][ODBC Driver 18 for SQL Server]Client unable to establish a connection

Can suggest what went wrong and how could I fix this issue?

Please point us to any references on how to create SSL certificates.

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

2 answers

Sort by: Most helpful
  1. CathyJi-MSFT 22,321 Reputation points Microsoft Vendor
    2022-09-22T06:45:19.61+00:00

    Hi @Sreedhar P ,

    Please check the SQL server instance name that you want to connect is correct. In addition, suggest you reconfigure certificate on both SQL server and client machine.


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

    1 person found this answer helpful.
    0 comments No comments

  2. Tom Phillips 17,741 Reputation points
    2022-09-21T16:48:10.08+00:00
    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.