Avatar of John Ellis
John Ellis
 asked on

Logging in as SQL's "sa" Fails on the First Attempt but Not on the Second

Hello:

This experience that I had, yesterday, simply peaked my curiosity.  So, I thought that I would ask you all.

Yesterday, our DBA changed a SQL instance's "sa" password.  

In addition, we have an app that utilizes an ODBC connection to connect to this SQL instance.  The ODBC connection, though, was not configured with "sa" as the user ID.  

In any case, we have this app installed on three Terminal Server boxes.

After this password change, I attempted to login to the app as "sa" on all three boxes.  

The very first attempt on each box failed but not the second.

True, it's possible that I may have simply typed the new password incorrectly, during the first attempt on each box.  

But, I'm not so sure that that's the case.  It just really seems odd to me that, after an "sa" password change, the first attempt on three Terminal Server boxes fails but not on the second attempt.

This seems more than just a simple case of a mistyped password or coincidence.  Again, though, what do you all think?

John
Microsoft SQL Server 2008Microsoft SQL Server

Avatar of undefined
Last Comment
Mark Wills

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Qlemo

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
John Ellis

ASKER
Hi There, Qlemo:

Thank you, so much, for the quick response.

I'm sorry.  But, can you please tell me what you meant by, "Probably the old password has been provided instead of the one you entered. "?

Thanks, again!

John
Qlemo

As said, the app might be the culprit - using the old password first, then replacing it with the new one. An application bug.
Mark Wills

Qlemo is probably correct, a caching issue. It can also be caused by your authentication mode and a confused SQL Server as to who you really are. SQL will store user and (hashed) password in Master database and try to match that with SQL login (windows authentication). Basically the user always needs to be associated with a trusted connection. It would normally throw an error message, and would need to see that.

If it was a once off problem, I wouldn't worry too much. But if it is happening often enough, then you will need to resolve properly.

Here is a MS Support link (so, you aren't the only one) describing a possible fix... https://support.microsoft.com/en-au/kb/2121736 also check (this newer one, and describes better with links and error message explanations) https://support.microsoft.com/en-us/kb/555332

To fully diagnose the problem we would need a lot more information from you...
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Mark Wills

John,

How are you going with this ? Havent heard from you in a while... Would be interested to hear of any developments.
John Ellis

ASKER
Hi Mark:

I was just waiting to see, if I received other opinions.  It sound like, based on what you all are saying though, the password was simply cached--either in SQL or the app that I was using.

John
Mark Wills

Fair enough...

Just curious, what authentication mode are you using ?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
John Ellis

ASKER
Our SQL uses Mixed Mode Authentication.

John
Vitor Montalvão

Old question but seems not any comment marked as solution.

John, do you remember the error thrown by the first attempt?
Mark Wills

Sounds like Qlemo had the right answer...
Your help has saved me hundreds of hours of internet surfing.
fblack61