The SQL Server login does <sqluser> not exist on the <servername> server


The server for a Nav 5 implementation that I am working on crashed about a month ago. A new windows 2012 r2 server was created and NAV restored. Several hundred users were added by an administrator, about 700 I think - users dating from 10+ years ago, even if they aren’t there now - at that time the syncing worked fine he said.

However, as of two days ago they are getting the message mentioned in the subject - but the fact is that the user does actually exist on the sql server.

It happens when either a) the admin goes and adds a new user in NAV / database user and also adds the matching user in SSMS, and then goes to "Sync All’

or b) it seems to be happening starting with users beginning with ‘a’ - in other words I think it is not finding ANY user that is listed in NAV database user list in SQL Server, even though they are in SQL Server.

NAV is a published Citrix app, I don’t know if that is relevant.

Windows security update kb4493446 was installed 5 days ago - doubt it’s relevant but just mentioning it.

A long time since I’ve worked with NAV 5.0, but let me see how much I remember. Really not so different from now.

I assume that we talk about Windows users, not SQL users?

What typically goes wrong when moving a database from on SQL Server to another, is that while they are created as users in the database, and are restored with the data, then they are not created as users in the new SQL Server’s user database.

Whenever I do it my self (which most often is when I have a SQL backup from a customer I need to restore locally), then I always start by deleting all users and recreates them again. But I’m sure someone else here got a better explanation.

Sorry, but did you create the symcronization for all users? look like your admin miss this step. If I remember correctly you need to create SQL users (we did movements by script), restore NAV and do syncro. The MAIN point - SAME users (domain, “setup”, etc) should exist in SQL.

Based on your information “2 day ago” someone did Syncro and users gone (because was moved non-correctly)

Thank you for your replies. [mention:61b2aa9ce72e429baa1ef43208ddbea4:e9ed411860ed4f2ba0265705b8793d05] we are talking about SQL users, not windows users.

[mention:3b5560b438a04164a33c5f6e34e2c4af:e9ed411860ed4f2ba0265705b8793d05] I was not there for the original restore - was brought in later to look into SQL Server issues specifically, but I don’t have that much NAV experience personally. The thing is, the admin says that this all worked 3 weeks ago when he did the initial sync, but stopped working now. Most people have said the problem occurs when the user is in NAV list of database users but not in sql, but the user is in SQL. I’ve heard that it helps/may help to remove the SQL user and add them back - but so far that didn’t help - I think (will double check)

This is under “standard” security". Would it help (or hurt) to go to enhanced? The admin doesn’t remember whether it was ever under enhanced. Would it hurt to set to enhanced and then back to standard?

I noticed, for example, that things are out of sync “on both sides”, meaning that there are some users in sql that are not in nav, and vice versa. Is it problematic to have users in sql that are not in nav - there are many of those.

i am adding some info to this. I am still working with the client to figure out the history of what was done after the crash. What he told me today was that after the crash he rebuilt the users lists and all the users started working. He didn’t do a sync all as I had previously thought. However, the problem is when he goes to add new users individually. He adds the sql user, then he adds the nav database user and when he adds the nav database user it gives him the error in question - even though the sql user is there. However, today he says that one of the users that he got the error on, even though it gave the syncing error, that user was actually able to go on and get in and start working. Now he added another user and it gives the syncing error - I will find out if the user is actually working in spite of the sync error.

Does this help or shed any light on the problem?