How to Create BACPAC for Azure SQL

A BACPAC is a Windows file with a .bacpac extension that encapsulates a database’s schema and data. The primary use case for a BACPAC is to move a database from one server to another – or to migrate a database from a local server to the cloud. I’ll write about BACPAC because I want to introduce you with NAV 2016 database migration to Azure SQL Server. I already had a session with this topic on NAV TechDays in Antwerp and I want to introduce more people with this processes.

If you want to prepare BACPAC file from your NAV 2015 database, you need to run Microsoft SQL Management Studio and find your local database from where you want to create BACPAC file.

SQL1.png

Right-click on database and choose Task > Extract Data-tier Application. Click Next and choose where you want to save your BACPAC file.

If you want to save it on local HDD, choose “Save to local disk” and browse the location where you want to save this file on your local computer.

SQL2.png

If you want to deploy it to Azure storage, choose “Save to Windows Azure”, click Connect and type your Storage Account and Storage Key and choose Container. If you want to change BACPAC temporary name and location, change the file name and browse the location. This temporary file and location is file where system will put BACPAC file before it’ll be uploaded to Azure storage; after that system will delete it. Click Next and Finish and wait. System will create BACPAC file.

8 thoughts on “How to Create BACPAC for Azure SQL

  1. The article says “Task > Extract Data-tier Application. ”
    This should be: “Task > Export Data-tier Application.” (like the screenshot)

    Like

  2. Hello,

    I have a questions regarding the bacpac file for NAV Database.
    Does the bacpac file contain nav objects or only the data (and tables structure ?) ?

    Thank for your reply.

    Like

    • Depends what you want to add to bacpac. If you have standard single tenant database, objects will be in. If you have multi tenant, depends what you are using, app or data db.

      Like

      • Ok.

        I’m using a multitenant database.
        If i understood well, if i’m using apps i have objects ?
        And data db, i dont ?

        Like

      • ok and all questions i have asked are right for nav 2015 and bacpac file ?
        Is it the same as NAV 2016 as you described on your blog ?

        Thanks.

        Like

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.