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:
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.
Click on the “Security” tab. You will notice that “Windows Authenication mode” has been selected.
Click on “SQL Server and Windows Authentication mode”. Click OK.
You will get a message saying that, you should restart SQL server. Click OK.
Then, to restart the SQL server, just right-click on the server name again, and select “Restart” option.
Sorted. Now, you should be able to login to your Dynamics NAV using Database Logins.