Tuesday, August 11, 2015

Restoring a NAV Database in a Different Domain

You may need to restore a Microsoft Dynamics NAV database in a situation where the users you had previously created are no longer available. For example, if you have restored your database in a different Windows domain or on a different network altogether. In this situation, you must take extra steps to assure that you will be able to run the Microsoft Dynamics NAV Windows client and connect to the database.
One option is to truncate the four tables that contain user data. When there are no users in the database, the first user who runs Microsoft Dynamics NAV Windows client is automatically added to the database and granted the SUPER permission set. For more information, see First User Is Automatically Assigned the SUPER Permission Set.
To truncate the tables, run SQL Server Management Studio and execute a query like the following:

USE <restored_db>;
TRUNCATE TABLE "User Personalization";
TRUNCATE TABLE "User Property";
TRUNCATE TABLE "Access Control";
TRUNCATE TABLE "User";
GO 
 
The disadvantage of this option is that you lose all your user data, and must therefore recreate all users.
A second option is to use SQL Server Management Studio to update the User table in the Microsoft Dynamics NAV database to update Windows Security IDs for the new domain. For each user, run a query like the following:

UPDATE User SET [Windows Security ID] = '<new_Windows_security_id>' where [user name] = '<username>';
GO

Monday, August 10, 2015

Cannot open any 'setup.exe' file

Try running sfc /scannow

The sfc /scannow command scans all protected system files and replaces corrupted and incorrect versions with correct Microsoft versions.

Run Command Prompt as administrator. If you are prompted for an administrator password or for a confirmation, type the password, or click Allow.

Type the following command, and then press ENTER: sfc /scannow

“Invalid License Data. Reinstall is required” error when installing NAV or SharePoint

I had Visual Studio installed and after installing SQL Server with tool, when trying to install NAV or SharePoint the infamous "Invalid license data. Reinstall is required." popup as shown below.
I also discovered that there was problems with starting VS2010 which was a default program for opening file with .hta files extension.
Invalid license data.  Reinstall is required.
I discovered that the problem comes from the program Microsoft Visual Studio 2010 Shell (Isolated) - ENU that gets installed with SQL Server 2012/2014. After uninstalling that program and then running the NAV installer I was able to see the splash screen.