Error: Login failed for user ‘username’. The user is not associated with a trusted SQL Server connection

Last week, when testing Extended Demo Database, when logging to SQL server with Dynamics NAV client, I received error message saying: “Login failed for user ‘username’. The user is not associated with a trusted SQL Server connection.” This got me thinking… what did I do differentlly? I was able to login just a minute ago and nothing really changed since then… but the error message was there, starring at me:

The following SQL server error or errors occurred - The user is not associated with a trusted SQL Server connection

Then (while making a cup of coffee), it hit me – I was trying to login with “Database Logins” user and previously I have been working with Windows Logins. Which must mean, that my SQL server has been configured to operate in “Windows Authentication Mode” only and it didn’t allow
the use of SQL (Database Logins) accounts.

So, all I needed to do, was to change the Authentication Mode of the SQL server from “Windows Authentication Mode”
to “Mixed Mode” (Windows Authentication and SQL Server Authentication).

How do you change the Authentication Mode of the SQL server?

Start SQL Server Management Studio. Connect to your SQL server and right-click on the server and select Properties.
SQL Error - Properties

Click on the “Security” tab. You will notice that “Windows Authenication mode” has been selected.
SQL Error - Windows Authentication mode

Click on “SQL Server and Windows Authentication mode”. Click OK.
SQL Error - SQL Server Authenticationn

You will get a message saying that, you should restart SQL server. Click OK.
SQL Error - Configuration Changes Require Restart

Then, to restart the SQL server, just right-click on the server name again, and select “Restart” option.
SQL Error - Restart Server

Sorted. Now, you should be able to login to your Dynamics NAV using Database Logins.

Technorati Tags: , , , ,

This entry was posted in Dynamics NAV / Navision, errors and tagged , , , , . Bookmark the permalink.

Leave a Reply

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