How-to get access when you can’t get into your NAV SQL-DB

What happened?

You have a full backup of your customer and restore it on your server. Once the restore is finished, you have to create a user in NAV that is known on your server. THIS BEFORE getting out of NAV. But of course you have forgotten to do it and now you can’t get into your DB.

If you have done a restore in a native DB, there is no other option than to redo the complete restore.

If, on the other hand, you have a SQL DB, than there are some methods to fix it.
1. First try to login with user ’sa’. A lot of times, this user is also defined as a NAV database login.
2. If you know a NAV Database login that has superuser rights, you can just use that user in SQL.
3. Add the user you want directly into the tables of SQL

  • 3.a. Run the table “dbo.Member Of” in the SQL Server Management Studio (your database => Tables => dbo.Member Of => right mouse button => Open Table).
  • accessnavsqldb1.png

  • 3.b. Add the User ID and Role ID and the Company (remove the NULL value, but do NOT put a blank). Don’t put a value in the timestamp-field. Remember to use uppercase-characters”.
  • accessnavsqldb2.png

  • 3.c. Run the table “dbo.User” in the SQL Server Management Studio (your database => Tables => dbo.User => right mouse button => Open Table).
  • accessnavsqldb3.png

  • 3.d. Add the User ID and the password (remove the NULL value, but do NOT put a blank) and the Company (remove the NULL value, but do NOT put a blank). Don’t put a value in the timestamp-field. Remember to use uppercase-characters”. In “Expiration Date”, put a date in the future.
  • accessnavsqldb4.png

  • 3.e. Now you can enter NAV using this login
  • 4. Another way is to delete all logins and their roles from the tables. The following sql-statements do just that:
    delete from dbo.[Member Of];
    delete from dbo.[User];
    delete from dbo.[Windows Access Control];
    delete from dbo.[Windows Login];

    One Response to “How-to get access when you can’t get into your NAV SQL-DB”

    1. What did NAV bloggers say in February?…

      Microsoft Dynamics NAV blogosphere wasn%u2019t particularly active in February. Trust me, I don%u2019t blame anyone…

    Leave a Reply

    You must be logged in to post a comment.

    Create a new blog and join in the fun!