Solving the Target Principal Name is Incorrect

, 2018-05-31

A bit of minor negligence can cause havoc at times. This article presents a practical situation that I faced in my organization.

In our working environment, we use a VDI (Virtual Desk Interface) to connect to the client environment. From this VDI, we make a remote RDP connection to the various database servers. Once we log into the database server, we use SSMS to connect to SQL Server instances.

As part of regular support, one day when I tried to connect to a SQL Server instance, I received the below error:

In the process of troubleshooting, I tried the following:

  • Checked with other administrators who have a similar level of access to see if they are facing the same issue but they were able to connect without any issues.
  • Checked if my personal administrator access was lost to determine why my active user id has stopped working all of a sudden.
  • Checked tech forums to find out if someone else faced a similar issue but no use in resolving the issue.

My Solution

Finally, I logged off from the database server and tried re-connecting to the database server with the domain password that I had changed on that same day morning in accordance with the security suggestion from our domain controller. Then tried to connect to the SQL Server instance through SSMS and I was able to connect successfully this time and was able to do all my day to day administration tasks.

Root Cause of the Issue

At times, especially when in a hurry, administrators forget to disconnect/logoff from the database servers properly at the end of the day. Instead they just disconnect the database server in one of two ways. They can click the window close button, which is available in the right-hand corner, or just leave the session as open. The previous day, I clicked close to end my work.

On the day when I faced this issue, while connecting to the VDI, the session prompted me to change my domain password to connect and I had to change the password to login to the client environment. 

The actual root cause is the abrupt closing of the session.  When I connected to the VDI with the newly changed credentials, SSMS was trying to connect to the SQL istance using my old domain password because the database server session and SSMS were not closed on the previous day when I disconnected from the VDI. This was the reason SSMS was not to connecting to the instance successfully.

I logged off from database server at the OS level after disconnecting all the instances in SSMS that were connected using my old password. When I re-connected to the database server using my new password, everything worked as expected and I was able to connect to the SQL Server instance without any issues.

So next time spend some time to logoff appropriately and not abruptly so that you won’t mess the fresh start next day! Hope this article was helpful.

Rate

3.67 (6)

Share

Share

Rate

3.67 (6)

Related content

Worst Practice - Bad Connection Strings and Bad Info in Sysprocesses

Andy returns to the Worst Practice series this week with a short article looking at how connection strings in applications affect what you see in sysprocesses. Perhaps less controversial (in our opinion) that some of the other worst practices, this is something easy to fix and definitely worth fixing! Read the article and post a comment - explore other points of view! Readers posting a comment will be entered in a drawing for a copy of the SQL Server 2000 Resource Kit.

2003-08-01

15,125 reads

Logins, Users, and Roles - Getting Started

Do you know the difference between a login and a user? What's the best way to add them; Enterprise Manager, T-SQL, or SQL-DMO? In this beginner level article Andy demonstrates how to use all three methods to add logins and users and offers his view of which is the best technique.

2005-09-30 (first published: )

35,340 reads

The Case for SQL Logins - Part 1

Andy says Windows Authentication "is bad". What? That's not what Microsoft says! Heck, that's not even what we say! Everyone knows NT authentication is the way to go. Then again, when was the last time Andy wrote an article that wasn't worth reading?! Read the article, rate it and add a comment - and automatically be entered in a drawing for a copy of SQL Server 2000 Performance Tuning donated by Microsoft Press.

2 (1)

2002-06-25

12,610 reads