Categories
Dynamics NAV Microsoft

The program can’t start because MSVCP120.dll is missing from your computer


finsql.exe – System Error
The program can’t start because MSVCP120.dll is missing from your computer. Try reinstalling the program to fix this problem. 
OK 

Solution:
You need to install Visual C++ Redistributable Package.  
You can download it from the following link:
https://support.microsoft.com/en-us/help/3179560/update-for-visual-c-2013-and-visual-c-redistributable-package

If you’re using a 64-bit Windows version you need to install both version x86 and x64 (vcredist_x86.exe_ and vcredist_x64.exe) If, however, you’re on 32-bit Windows version, install only vcredist_x86.exe.

The missing DLL can be download from the following link:
https://www.dllinstaller.com/dlls/msvcp120-dll

Did my solution solve your problem? Leave a reply.

Categories
Dynamics NAV Microsoft PowerShell SQL Server

Import-NAVEncryptionKey : Cannot establish a connection to the SQL Server/Database

If you are sure that the values inserted in the parameters are correct but you are receiving the following error message:

Import-NAVEncryptionKey : Cannot establish a connection to the SQL Server/Database.

This could be due to one of the following reasons:
* SQL Server is not started.
* The database does not exist.
* Proper permissions have not been given to the NAV Server Account.
Try again later or contact your system administrator.
At line:1 char:1
+ Import-NAVEncryptionKey
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (0:Int32) [Import-NAVEncryptionKey], NavCSideException
+ FullyQualifiedErrorId : Microsoft.Dynamics.Nav.Management.Cmdlets.ImportNavEncryptionKey

Cause:
Maybe the user you are using to run the script does not have access to the db, this is a common issue when you use ‘Database Authentication Mode = SQL Server Authentication’. To be safe use the same account you set up in the instance for the ‘Database Credentials’.

Solution:
Run Windows PowerShell ISE as Administrator and run the following script changing placeholders with the angle brackets (<>) with your values

Set-ExecutionPolicy unrestricted -Force
Import-Module 'C:\Program Files\Microsoft Dynamics NAV\<NavVersion>\Service\NavAdminTool.ps1'

$Credential = (New-Object PSCredential -ArgumentList '<LoginName>',(ConvertTo-SecureString -AsPlainText -Force '<Password>'))

Import-NAVEncryptionKey -ApplicationDatabaseCredentials $Credential -ApplicationDatabaseServer <DatabaseServer> -ApplicationDatabaseName <DatabaseName> -KeyPath '<KeyFilePath>' -ServerInstance <InstanceName> -Force

Did my solution solve your problem? Leave a reply.