This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Community Hub.
We are excited to announce General Availability of Import Export service for Azure SQL Database Hyperscale service tier. In this blog we are going to see how to perform Import and Export operations on a Azure SQL Hyperscale database using Import Export service.
Import Export service is available on all service tiers of Azure SQL Database except for Hyperscale. With a recent upgrade to the service, it is now available on Hyperscale service tier. Users can now import their existing .bacpac files as Hyperscale databases and also export their existing Hyperscale database as .bacpac files into external storage.
On Hyperscale service tier, Import Export service offers same set of capabilities and experience that are available on other service tiers of Azure SQL Database.
Steps to perform Import and Export operations on a Hyperscale database
Import Export service's existing Portal, PowerShell and Azure CLI experiences can be used to perform import and export operations on Hyperscale databases as well. Here are the steps to perform Import and Export operations:
Portal
Below are the steps to perform Import and Export operations using Azure Portal:
Import
- To import from a BACPAC file into a new single database using the Azure portal, open the appropriate server page and then, on the toolbar, select Import database.
- Select the storage account and the container for the BACPAC file and then select the BACPAC file from which to import.
- Click on Configure database and select Hyperscale (On-Demand scalable storage) for Service tier parameter. Provide the destination SQL Server credentials. For a list of possible values for a new database in Azure SQL Database, see Create Database.
- Click OK
- To monitor an import's progress, open the database's server page, and, under Settings, select Import/Export history. When successful, the import has a Completed status.
Export
- To export a database using the Azure portal, open the page for your Hyperscale database and select Export on the toolbar.
- Specify the BACPAC filename, select an existing Azure storage account and container for the export, and then provide the appropriate credentials for access to the source database. A SQL Server admin login is needed here even if you are the Azure admin, as being an Azure admin does not equate to having admin permissions in Azure SQL Database
- Select OK
- To monitor the progress of the export operation, open the page for the server containing the database being exported. Under Data management, select Import/Export history.
PowerShell
Below are PowerShell commands to perform Import and export operations.
Import
You can use New-AzSqlDatabaseImport PowerShell command to perform Import operation on a Hyperscale database. Here is a sample command:
You can use the Get-AzSqlDatabaseImportExportStatus cmdlet to check the import's progress. Running the cmdlet immediately after the request usually returns Status: InProgress. The import is complete when you see Status: Succeeded.
Export
You can use New-AzSqlDatabaseExport PowerShell command to perform Export operation on a Hyperscale database. Here is a sample command:
To check the status of the export request, use the Get-AzSqlDatabaseImportExportStatus cmdlet. Running this cmdlet immediately after the request usually returns Status: InProgress. When you see Status: Succeeded the export is complete. Here is a sample command to check status of Export operation:
Azure CLI
Below are Azure CLI commands to perform Import and Export operations:
Import
Use the az-sql-db-import command to submit an import database request. Depending on database size, the import may take some time to complete. Here is a sample CLI command to run import:
Export
Use the az-sql-db-export command to submit an export database request. Depending on database size, the export may take some time to complete. Here is a sample CLI command to run export:
More details on Import Export service, can be found in the documentation:
- Import - Import a BACPAC file to create a database in Azure SQL Database - Azure SQL Database | Microsoft Learn
- Export - Export a database to a BACPAC file - Azure SQL Database & Azure SQL Managed Instance | Microsoft Learn
- Import database using PowerShell - New-AzSqlDatabaseImport (Az.Sql) | Microsoft Learn
- Import database using Azure CLI - az sql db | Microsoft Learn
- Export database using PowerShell - New-AzSqlDatabaseExport (Az.Sql) | Microsoft Learn
- Export database using Azure CLI - az sql db | Microsoft Learn