Skip to main content

"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.

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."


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?


  1. It is a recommended best practice to use Windows Authentication as far as possible because it gives you added protection.

  2. Let us take to consideration also that we need to restart SQL Server service in case we change the Authentication method from Windows Authentication to Mixed mode. And as a Production DBA it is not a good practice to restart your SQL Server Service without a proper Change Management Process in place.


Post a Comment