· Updated · Dynamics NAV/365 BC · 2 min read

Error importing NAV License in AzureSQL Database

When opening a database installed in AzureSQL, you may get this error:

The database on the server requires a Per Database license to be opened on SQL Azure

You must use Powershell to import the Dynamics NAV license. To import a license file to a AzureSQL database I used the following command:

Import-NAVServerLicense DynamicsNAV100 -LicenseData ([Byte[]]$(Get-Content -Path “C:\Licenses\NAV_2017_DEV.flf” -Encoding Byte))

But I was having the following error:

Reference to database and/or server name in ‘master.dbo.$ndo$srvproperty’ is not supported in this version of SQL Server

To resolve it, I needed to add an additional parameter to the command: “-Database 2”.

Import-NAVServerLicense DynamicsNAV100 -LicenseData ([Byte[]]$(Get-Content -Path “C:\Licenses\NAV_2017_DEV.flf” -Encoding Byte)) -Database 2

UPDATE: In order to use this command, you have to import Dynamics NAV powershell modules running this “Import-Module “C:\Program Files\Microsoft Dynamics NAV\100\Service\NAVAdminTool.ps1” -force”, prior to using the Import-NAVServerLicense command.

From Microsoft Dynamics NAV 2016 documentation:

https://msdn.microsoft.com/en-us/library/jj672905(v=nav.90).aspx

-Database

Specifies the database into which to import the license file. The possible values are described in the following list:

Default = 0

Default; overrides the license file currently in use.

Master = 1

Forces the license file to be global.

NavDatabase = 2

Forces the license file to be local and stored in the Microsoft Dynamics NAV database that is used by the specified Microsoft Dynamics NAV Server instance.

Tenant = 3

Forces the license file to be local and stored in the Microsoft Dynamics NAV database that is used by the tenant that is specified in the Tenant parameter.

Regards,
Ricardo Paiva Moinhos
www.ricardomoinhos.com

Share:
Back to Blog