Skip to content
Microsoft Dynamics 365 Blog

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  

We're always looking for feedback and would like to hear from you. Please head to the Dynamics 365 Community to start a discussion, ask questions, and tell us what you think!

Join the conversation

Loading comments...