the target principal name is incorrect SQL

Ahmad MUNIR 1 Reputation point
2023-01-06T13:49:46.417+00:00

We have configured our organization's Windows 2022 Domain Controller and have been attempting to run windows updates which are mentioned below.

276840-image.png

However, we have encountered a Kerberos authentication issue that has prevented the authentication of the users and MS SQL, as mentioned below.

SQL Server 2019 version sp1
276867-image.png

Windows for business | Windows Server | User experience | Other
SQL Server | Other
{count} votes

3 answers

Sort by: Most helpful
  1. Thameur-BOURBITA 36,261 Reputation points Moderator
    2023-01-08T19:11:13.48+00:00

    Hi,

    You shoud start by checking if the required SPN for SQL service is well configured.
    Check if the AES encryption of kerberos authentication is already configured on SQL service account and computer object of SQL server.
    AES encryption
    service-principal-name-spn-support-in-client-connections

    Please don't forget to mark helpful reply as answer


  2. Seeya Xi-MSFT 16,586 Reputation points
    2023-01-09T07:16:28.407+00:00

    Hi @Ahmad MUNIR ,

    This error means that SSPI tries but can't use Kerberos authentication to delegate client credentials through TCP/IP or Named Pipes to SQL Server. In most cases, a misconfigured Service Principal Name (SPN) causes this error.
    For more information, please refer to this document: "Cannot generate SSPI context" error when using Windows authentication to connect SQL Server.

    If you run the SQL Server service under a domain account or under a local account, the attempt to create the SPN will fail in most cases because the domain account and the local account do not have the right to set their own SPNs.

    Please see this thread, AmeliaGu replied with a very complete answer which contains many links you can refer to. Also, Kerberos Configuration manager is an official tool to help you troubleshoot SPN and delegation issues.

    Best regards,
    Seeya


    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".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  3. Olaf Helper 47,436 Reputation points
    2023-01-09T11:32:20.193+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.