Can anyone help me with double backslash in domain username

  • 16 September 2019
  • 4 replies

Userlevel 2
Badge +3
When I want to start my application as a domain user, I get the following message
"Cannot open database "..._IAM" requested by the login. The login failed.
Login failed for user 'DOMAIN\\user'."

All the domain users work properly, only the users that has been set on "disabled" and later set back to "enabled" have the double backslashes.
When I start SSMS i can normally logon to the databases.


Can anyone help me on this?
Thanks in advance

Best answer by Marco Kleiweg 18 September 2019, 17:07

View original

4 replies

Userlevel 2
Badge +1
Hi Marco, could you somehow add a screenshot of the error message? This may help with the analysis. Thanks in advance.
Userlevel 2
Badge +3

ereby a screenshot. It's all I can offer you.
I hope you can help me and my client.
Userlevel 2
Badge +1
Hmm... what happens internally is that the Windows GUI uses the authentication method only for the connection string, like in this example:

Data Source=myserver;Initial Catalog=MY_DATABASE;Integrated Security=True;Pooling=True;MultipleActiveResultSets=False;Application Name="Thinkwise Software Factory";Current Language=English

I don't know how SQL server handles this exactly, but if I look at Security -> Logins in SQL Server Management Studio all domain names there have one backslash only. Is it possible to change the login name of affected users by adding a backslash, or somehow refresh their properties? And would that fix the problem?
Userlevel 2
Badge +3
Adding a backslash to the names was no option. That's why I took a more radical way if refreshing the properties. I deleted the logins and created them again.
This solved the problem.
Thanks for helping.