Export Azure SQL Database using PowerShell and Azure CLI as Bacpac
Export Azure SQL Database using PowerShell and Azure CLI as Bacpac.
The New-AzSqlDatabaseExport cmdlet exports an Azure SQL Database as a .bacpac file to a storage account. The get export database status request may be sent to retrieve status information for this request. This cmdlet is also supported by the SQL Server Stretch Database service on Azure.
Example 1: Create an export request for a database
Open Cloudshell
New-AzSqlDatabaseExport -ResourceGroupName "RG01" -ServerName "Server01" -DatabaseName "Database01" -StorageKeyType "StorageAccessKey" -StorageKey "StorageKey01" -StorageUri "account01.blob.core.contoso.ne..." -AdministratorLogin "User" -AdministratorLoginPassword "secure password"
ResourceGroupName : RG01
ServerName : Server01
DatabaseName : Database01
StorageKeyType : StorageAccessKey
StorageKey :
StorageUri : account01.blob.core.contoso.ne...
AdministratorLogin : User
AdministratorLoginPassword :
AuthenticationType : None
OperationStatusLink : management.azure.com/subscrip...
0-0000-0000-000000000000?api-version=2014-04-01
Status : InProgress
ErrorMessage :
In Azure CLI, az sql db export
Export a database to a bacpac.
az sql db export --admin-password
--admin-user
--storage-key
--storage-key-type {SharedAccessKey, StorageAccessKey}
--storage-uri
[--auth-type {ADPassword, SQL}]
[--ids]
[--name]
[--no-wait]
[--resource-group]
[--server]
[--subscription]
#cloudknowledge #bacpac #azuresql #azureforbeginners #cloudcomputing
Пікірлер: 3
Thank you, great video!
@CloudKnowledgeChannel
6 ай бұрын
Thanks 😊
Hi, does work only on storage accounts whose networking - enabled for all networks and not for selected networks