Image creation from Azure SQL
Published 12 November 2020
Azure SQL Database does not provide any external access to the file system, so SQL Clone cannot create an image from it directly. However, it still possible to create a SQL Clone image from an Azure SQL Database by following these steps:
Export a BACPAC in Azure
SQL Clone will need both the database structure and data, so you’ll need to export the Azure SQL DB to a BACPAC which will contain both schema and data.
Import a local database copy from the BACPAC
You can do this with SQL Server Management Studio (SSMS). Right click in the object explorer and “Import a Data Tier Application“, based on your BACPAC and provide the relevant information.
Create an image from the imported database
Now that you have a live copy of your Azure SQL Database you will be able to use SQL Clone to create an image from it.
The following script shows how you can automate these steps using PowerShell.
View "Create a new SQL Clone data image from an Azure SQL database.ps1" on GitHub
Additional Resources for Azure SQL
In addition to this documentation, the Redgate Hub offers the following resources to help you find your way around SQL Clone's image and clone modification techniques, learn how to use them, and adopt best practices :
- Product learning article: