‘The user is not associated with a trusted SQL Server connection.’

By | January 9, 2008

About a month or so ago I came across this error message in SQL Server 2000 whenever I tried to test out YetAnotherForum (YAF) on my machine. I followed the instructions and created the database and the user like their instructions said. I even recreated the user and tried different settings, then recreated the database and then the user, but with no luck.

Finally, I searched Google, and found the simple answer, and VOILA, Darth Vader’s my father bob’s my uncle.

Now here I am tonight, trying to evaluate the DotNetKicks source code, and again I came across the exact same problem, but this time it was with SQL Express. Once again, I couldn’t for the life of me remember how to fix it. All I remembered was that it’s easier than I think. Without fighting with it like I did the last time, I once again asked the almighty Google, and once again, it gave me the answer.

For those of who who are wondering how to fix this problem, you’ll be happy to know that it’s as simple as changing your Authentication method to Mixed Mode (Windows Authentication and SQL Server Authentication) which is only 5 clicks (1 right click, and 4 lefts) and a restart of SQL Server.

1) Open up SQL Server Management Studio (or Enterprise Manager in SQL 2000) and login into the database using Windows Authentication.
2) On the right side, right click1 on the database, then go down and click2 on Properties. In SQL 2000, you may need to expand the tree view to expose the database that you want.
3) Click3 in Security.
4) Under Authentication, click4 on ‘SQL Server and Windows Authentication mode‘ in Management Studio, or ‘SQL Server and Windows‘ in Enterprise Manager, and then click5 OK.

5) Restart SQL Server by right clicking on the database again, but this time selecting Stop from the menu list. Once it has stopped, then do the same and click on Start.

And there we have it.

5 thoughts on “‘The user is not associated with a trusted SQL Server connection.’

  1. Bighi

    Thanx allot! i was driving crazy with this problem ๐Ÿ™‚

  2. Marc

    Also, sometimes you need to start the SQLBrowser. ๐Ÿ™‚

  3. carlj Post author

    And sometimes it can be as simple as that … but why?

    I don’t think I ever have the SQLBrowser running

  4. andre

    thanx man, that was driving me crazy… so easy!

    thanx again for sharing…

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.