Very Important: If the version on Azure is higher than the version you are importing into, this will not work because SQL is not backward compatible.
To create a SQL Azure database from a bacpac file in SQL Server Management Studio (SSMS), connect to the desired SQL Azure server and right-click on the Databases folder in the Object Explorer pane. In the context menu select Import Data-tier Application:
The above option will call the Import bacpac wizard and it will start by presenting the Introduction page:
Click on the Next > button to provide the Import Settings:
In the Import Settings, you are requested to provide the location of the bacpac file to import from. You can import from an existing bacpac file from the local disk or an Azure storage account. Since I have exported the bacpac file to my local disk, I will import it from there.
After providing the location and the bacpac file name, the Next > button will be enabled and then you can click on it to proceed. This will move to the Database settings screen:
In the Database Settings page, you are requested to configure the new SQL Azure database by providing the new database name (by default it will present the source database name) and the maximum database size (by default it will be configured with the maximum allowed size for the selected edition).
I will keep the original database name for this case but will change to the Basic edition since the database is very small and I do not need to go for a more expensive edition.
Click on the Next > button to proceed to the Summary page:
On the Summary page, confirm that you provided the correct information. As you can see by the above screenshot, I have changed the edition to Basic. After confirming, click on the Finish button to start the Import.
An error will be shown if there is an unsuccessful import and you will need to click on the respective error to find out what went wrong. The following screenshot shows how a successful import should look:
Click on the Close button to exit the BACPAC import wizard.
Note: If you are importing a backpac file from Azure to your local SQL Server instance, you need to run this below query on your server or get the below errors.
EXEC sp_configure 'contained database authentication', 1
GO
RECONFIGURE
GO