How Do I Set Up Microsoft Dynamics NAV to work with Azure SQL Database

Dynamics NAV 2016 supports the option of using Azure SQL Database, and we have recorded a “How Do I” video to explain the steps involved in deploying a Dynamics NAV SQL Server database to an instance of Azure SQL Database.

This blog post includes a Windows PowerShell script that can be used to configure the Dynamics NAV 2016 middle-tier service so that it works with an Azure SQL Database as described in the How Do I video:


$Credentials = (New-Object PSCredential -ArgumentList ‘<your Azure SQL Database login name>‘,(ConvertTo-SecureString -AsPlainText -Force ‘<your password>‘))

$License = “<path to the Dynamics NAV 2016 installation files>\SQLDemoDatabase\CommonAppData\Microsoft\Microsoft Dynamics NAV\90\Database\Cronus.flf”


Import-module “C:\Program Files\Microsoft Dynamics NAV\90\Service\NavAdminTool.ps1”


Install-WindowsFeature -Name NET-HTTP-Activation


New-NAVEncryptionKey -KeyPath “C:\TEMP\Key\DynamicsNAV.key” -Password (ConvertTo-SecureString -AsPlainText -Force ‘<password>‘) -Force


Import-NAVEncryptionKey -ServerInstance Dynamicsnav90 `

                        -ApplicationDatabaseServer `

                        -ApplicationDatabaseCredentials $Credentials `

                        -ApplicationDatabaseName ‘Demo Database NAV (9-0)’ `

                        -KeyPath C:\TEMP\Key\DynamicsNAV.key `

                        -Password (ConvertTo-SecureString -AsPlainText -Force ‘<password>‘) `

                        -Force -Verbose


Set-NAVServerConfiguration -DatabaseCredentials $Credentials -ServerInstance DynamicsNAV90 -Force


Set-NAVServerConfiguration DynamicsNAV90 -KeyName DatabaseServer -KeyValue -Force

Set-NAVServerConfiguration DynamicsNAV90 -KeyName DatabaseName -KeyValue ‘Demo Database NAV (9-0)’

Set-NAVServerConfiguration DynamicsNAV90 -KeyName EnableSqlConnectionEncryption -KeyValue true


Set-NAVServerInstance DynamicsNAV90 -Restart


Import-NAVServerLicense DynamicsNAV90 -LicenseFile $License -Database NavDatabase -Force