After upgrade from 4.0 to 4.0 SP2 and syncronize your windows user Id, you are still not able to login to your database through windows login. You already grant all the necessary roles and permission to your users. You even grant them dbowner and super role, but still can't login. If you use database login, you can login successfully. If this happens to you, most probably is because you have not update the xp_ndo.dll file in you SQL Server Binn directory.
When you upgrade to 4.0 SP2, make sure that you update the xp_ndo.dll on all instance of your SQL Server. You can find the step-by-step instruction on how to update the file from the sql_esp folder in Navision 4.0 SP2 Disk 1 CD.