You are here:Home » user » "Login failed for user 'username'. The user is not associated with a trusted SQL Server connection" - SQL Server

"Login failed for user 'username'. The user is not associated with a trusted SQL Server connection" - SQL Server

Recently i faced one more issue for login failed, this is different one from earlier and that was due to default databases deleted which was set as default for that login which failed.

Here I got the same issue, but slightly different and additional messages with it. The earlier was Login failed for user. This time I got Login failed for user and not associated with a trusted SQL Server connection.

Problem:
I have created one login for "DBA". After successfully created with it, I have assigned sysroles to the user. I am very happy here because this created user is for me and I am going to use this user only which have full access to the SQL Server instance and all the objects of that instance



After creating a user I have tried to connect the SQL Server instance. But SQL Server has given me one surprise gift. This gift was " Login failed for user 'dba'. " With addition following message.

"Login failed for user '<LoginName>'. 
Reason: Not associated with a trusted SQL Server connection."

Solution

I have checked the login properties and check the assigned roles, checked its status as enable or not. Also checked granted permission, but everything is OK. Finally, I have checked SQL Server instance properties and reviewed Security section. And here I found my solution. Please see the screenshot, you can see the SQL Server Authentication was "Windows authentication". That's why it was not allowed to connect instance through SQL users.


After changing SQL Authentication to SQL Server and Windows Authentication, I was able to connect a SQL Server instance. This is the most common error which we faced mostly. What you want to say here?