Dynamics NAV 2016: Extensions and SQL Azure

NAV 2016 Azure SQLDynamics NAV 2016 is the first version of NAV that allows running the database on SQL Azure, a fully managed and high available SQL as a Service. It is also the first version of NAV that has NAV Extensions, a new way to publish add-ons to NAV.

There are very good articles that provide information on how to publish a database on SQL Azure and how to create your own NAV Extensions. I am not going into the details of this, since those can be found here:

How to deploy a database on SQL Azure

Extending Dynamics NAV using extension packages

What is not mentioned anywhere and what cost me about a week to figure out together with NAV support is: You cannot deploy a NAV extension when you are running your database on SQL Azure. This feature is currently not supported, due to some constraints in the PowerShell commands as well as in the way extensions are actually deployed.

Extensions are compiled when they are published. For this, the system requires access to the SQL Database. And although the service tier is setup properly and can connect to the SQL Database on Azure, the PowerShell command Publish-NAVApp is using the actual service tier service account to get access to the database and not the setup configuration for the SQL Login. This is an oversight, in my eyes, and a pretty big one. Supposedly, this is going to be resolved in the next version.

To publish any extension in NAV 2016 on SQL Azure, you will have to install the database on a (on premise or on Azure) SQL Server and setup a service tier for this with a service account that has the proper permissions to the SQL Server and database. Then you can publish the extension and move the database onto SQL Azure as described above. Once the database is on SQL Azure again, you then can install the Extensions. So, the important point is to PUBLISH the extension on a “regular” SQL Server.