When you need to import a sql database file (.bak) from an archive in a local folder or from a file share , you can import the database schema and data from a BACPAC file. A BACPAC file is a ZIP file with an extension of .BACPAC containing the metadata and data from a SQL Server database. A BACPAC file can be imported to Azure and can be used as a standard SQL database in Cloud. Import using the Azure portal only supports importing a BACPAC file.
Below are the steps to follow:
- Create a BACPAC file
- Import the .BACPAC file into Azure
Above steps will create your local database into Azure cloud environment. We will go through the above steps in detail below.
Create a BACPAC file:
Right click on the database and select Tasks –> Export Data-tier Application as below.
Provide a valid path and a desired filename for the .bacpac file.
Export Database operation will be started
You will see below screen on successful completion of exporting the database into a bacpac file
File will be as below.
Import .BACPAC file into Azure
The database has now been successfully uploaded into Azure from a local storage.