Importing a database (Azure SQL Database only)
You can import a database into an Azure SQL server from a BACPAC
or DACPAC
file kept in Azure Storage. The import operation will create a new Azure SQL database from the BACPAC
file.
The BACPAC
file can be imported to any of the available Azure SQL servers in any given region. This can be useful for quickly creating new test environments.
The import can be done through the Azure portal, PowerShell, the Azure CLI, or the Azure SDK. Let's learn how to import a database from a BACPAC
file kept in Azure Storage. Open the Azure portal, go to https://portal.azure.com, and log in with your Azure credentials:
- From the left-hand navigation pane, open the All resources section. Select the Azure SQL server you wish to import the database to.
- In the Azure SQL Server Overview pane, select Import database:
Figure 5.35: Selecting the Import database option
- In the Import database pane, under Subscription, select your Azure subscription...