How to: Deploy a Microsoft Dynamics NAV Database to Azure SQL Database

This topic describes how you can deploy a Microsoft Dynamics NAV database to Microsoft Azure SQL Database.

To deploy a Microsoft Dynamics NAV database to Azure SQL Database, the database must be exported as a data-tier application (DAC) file, which is known as a .bacpac file. This can be performed by using SQL Server Manager, as described in this topic.

Important

To optimize, we recommend that the Microsoft Dynamics NAV Server instance that connects to the database is deployed on a virtual machine in Azure. Additionally, the virtual machine and SQL Database must be in the same Azure region.

To deploy a Microsoft Dynamics NAV database to Azure SQL Database

  1. Make sure that you have the following prerequisites for completing this procedure:

    • A Microsoft Azure subscription and access to the Azure Management Portal.

    • Microsoft Dynamics NAV database is installed on a SQL Server Database Engine instance. SQL Server Manager is also installed on the same computer.

    • Access to the Microsoft Dynamics NAV installation media (DVD).

  2. Create and configure an SQL Database Server in Azure.

    In the Azure Management Portal, create an SQL Database Server for hosting the Microsoft Dynamics NAV database.

    1. You must specify a login name and password for the server. You will use this information in the next steps when you deploy the Microsoft Dynamics NAV database to Azure SQL and set up the Microsoft Dynamics NAV Server to authenticate with the database.

    2. Configure the server to allow for access by Windows Azure Services.

    3. Configure the SQL database server firewall to allow for access by the IP address of the computer that you are using to deploy Microsoft Dynamics NAV.

    4. Make a note of the SQL Database server name because you will need it later.

    For more information about how to create and configure an SQL Database server, see Create your first Azure SQL Database and How to: Configure Firewall Settings (Azure SQL Database).

  3. Deploy the existing Microsoft Dynamics NAV database to an Azure SQL database.

    In SQL Server Manager, use the Deploy a Database to SQL Azure Wizard to deploy the Microsoft Dynamics NAV database from an instance of the Database Engine to the Azure SQL Database server you created in the previous step. The wizard deploys the database by first exporting the Microsoft Dynamics NAV database as a . bacpac file and then importing .bacbac file to the specified Azure SQL Database.

    1. Specify the server name as SQLDatabaseServerName.database.windows.net, where SQLDatabaseServerName is the name of Azure SQL Database server.

    2. Set the authentication to SQL Server Authentication, and provide the login name and password (from step 2) for accessing the Azure SQL Database server.

    3. Set the maximum database size to at least 10 GB.

    4. Make a note of the database name because you will need it later.

    When completed successfully, you can connect to the database in Azure SQL from the SQL Server Manager or from the Azure Management Portal.

    For more information about how to deploy a database to Azure SQL, see Deploy a Database By Using a DAC

  4. Create and configure an Azure Virtual Machine for Microsoft Dynamics NAV Server.

    In the Azure Management Portal, create a virtual machine on which you will later install the Microsoft Dynamics NAV Server.

    1. Choose an image for an operating system that is supported by the Microsoft Dynamics NAV Server. For more information, see Microsoft Dynamics NAV Server Requirements supported

    2. Make a note of the Cloud Service DNS Name and the user name and password that you specified because you will need this later.

      The user name and password will be used for logging on the Azure SQL database.

    3. Set up endpoints for the Microsoft Dynamics NAV client services, Remote Desktop PowerShell.

      You must set up an endpoint for the TCP port that clients will use to communicate with the . The default is port in the configuration is 7046.

      Remote Desktop and PowerShell ports are set up automatically.Microsoft Dynamics NAV ServerMicrosoft Dynamics NAV ServerMicrosoft Dynamics NAV.

    For more information, see How to create a custom virtual machine

  5. Configure the Azure SQL Database Server firewall to allow the Microsoft Dynamics NAV Server virtual machine to connect to the database server.

    In the Azure Management Portal, you must add a rule to the firewall that allows the public virtual IP address of the Microsoft Dynamics NAV Server virtual machine. For more information, see How to: Configure Firewall Settings (Azure SQL Database).

    Note

    You can identify the IP address by viewing the Dashboard of the virtual machine in the Azure Management Portal.

  6. Install and configure a Microsoft Dynamics NAV Server instance on the virtual machine.

    From the Azure Management Portal, connect to the virtual machine. Run the setup.exe file that is available on the Microsoft Dynamics NAV installation media (DVD) to install the Microsoft Dynamics NAV Server.

    1. After you install the Microsoft Dynamics NAV Server, configure SQL Server Authentication on the Microsoft Dynamics NAV Server instance. For the database credentials, use the login name and password that you set up in step 2.

      For more information, see How to: Configure SQL Server Authentication in Microsoft Dynamics NAV.

The Microsoft Dynamics NAV database is now deployed and configured on Azure. For developing, you can connect to the database from the Microsoft Dynamics NAV Development Environment.

See Also

Concepts

Configuring Database Components
Configuring Microsoft SQL Server