Login failed for user 'YourUserName'. The user is not associated with a trusted SQL Server connection.
I was trying to add a new user to one of the databases and it was throwing me this error:
Login failed for user 'YourUserName'. The user is not associated with a trusted SQL Server connection.
I had seen this error before, but was not able to quickly realise the reason for the failure. I had created a sql server login, then a database user and finally mapped the sql server login to the database. The roles for the user were also set properly.
It was the sql server authentication modes. SQL Server was configured for only Windows authentication and not SQL authentication. Once SQL Server authentication was enabled, it worked fine. I had to reset the password after enabling SQL Server authentication mode.
Login failed for user 'YourUserName'. The user is not associated with a trusted SQL Server connection.
I had seen this error before, but was not able to quickly realise the reason for the failure. I had created a sql server login, then a database user and finally mapped the sql server login to the database. The roles for the user were also set properly.
It was the sql server authentication modes. SQL Server was configured for only Windows authentication and not SQL authentication. Once SQL Server authentication was enabled, it worked fine. I had to reset the password after enabling SQL Server authentication mode.
No comments:
Post a Comment