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.
Important
In order to make use of this cmdlet the firewall on the Azure SQL Server will need to be configured to "Allow Azure services and resources to access this server". If this is not configured then GatewayTimeout errors will be experienced. This is not required if a Private Link connection is established via the UseNetworkIsolation parameter.
Examples
Example 1: Create an export request for a database
This command creates an export request for the specified database using managed identity for authentication with connectivity over Private Link.
Parameters
-AdministratorLogin
Specifies the name of the SQL administrator.
If -AuthenticationType ManagedIdentity is provided, this should be the full resource ID of a user-assigned managed identity that is a Microsoft Entra administrator of the server.
Specifies the type of authentication used to access the server.
The default value is SQL if no authentication type is set.
The acceptable values for this parameter are:
Sql.
SQL authentication.
Set the AdministratorLogin and AdministratorLoginPassword to the SQL administrator username and password.
ADPassword.
Microsoft Entra authentication.
Set AdministratorLogin and AdministratorLoginPassword to the Microsoft Entra administrator username and password.
This parameter is only available on SQL Database V12 servers.
ManagedIdentity.
Managed identity authentication.
Use a user-assigned managed identity to authenticate with the SQL server. The managed identity must be a Microsoft Entra administrator for the server.
When -StorageKeyType ManagedIdentity is provided, this should be the full resource ID of a user-assigned managed identity which has write access on the storage account for the StorageUri provided (for example via a Storage Blob Data Contributor role assignment).
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.
Important
In order to make use of this cmdlet the firewall on the Azure SQL Server will need to be configured to "Allow Azure services and resources to access this server". If this is not configured then GatewayTimeout errors will be experienced. This is not required if a Private Link connection is established via the UseNetworkIsolation parameter.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.