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:

Script

$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 lo0jsfp81e.database.windows.net `

                        -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 lo0jsfp81e.database.windows.net -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  

Comments (4)

  1. Paty H says:

    Hi!
    It Works for Dynamics NAV 2015?

  2. Adam Hird says:

    I would like to try and run NAV 2015 on Azure SQL would be interesting to know if its possible.

    Did you ever find out Paty?

    1. Paty H says:

      I found that it isn’t possible 🙁

      Now I want to try with a NAV 2016 multitenant database on Azure SQL, someone knows something about it?

      1. I know it’s an old post, but still there’s not much info on this yet. Check out my Powershell script at https://primarilynav.wordpress.com/2016/04/21/automating-moving-nav-to-azure-sql-and-multitenancy/