Start-AzureSqlDatabaseExport
Starts an export operation from an Azure SQL Database to Blob storage.
Note
The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.
The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.
Syntax
ByContainerObject
Start-AzureSqlDatabaseExport
-SqlConnectionContext <ISqlServerConnectionInformation>
-StorageContainer <AzureStorageContainer>
-DatabaseName <String>
-BlobName <String>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
ByContainerName
Start-AzureSqlDatabaseExport
-SqlConnectionContext <ISqlServerConnectionInformation>
-StorageContext <IStorageContext>
-StorageContainerName <String>
-DatabaseName <String>
-BlobName <String>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
Description
The Start-AzureSqlDatabaseExport cmdlet starts an export operation from an Azure SQL Database to Blob storage. The operation requires a database server connection context. Use the Get-AzureSqlDatabaseImportExportStatus cmdlet to get the status of the export operation.
Examples
Example 1: Export a database
PS C:\>$Credential = Get-Credential
PS C:\> $SqlContext = New-AzureSqlDatabaseServerContext -ServerName $ServerName -Credential $Credential
PS C:\> $StorageContext = New-AzureStorageContext -StorageAccountName $StorageName -StorageAccountKey $StorageKey
PS C:\> $Container = Get-AzureStorageContainer -Name $ContainerName -Context $StorageContext
PS C:\> $exportRequest = Start-AzureSqlDatabaseExport -SqlConnectionContext $SqlContext -StorageContainer $Container -DatabaseName $DatabaseName -BlobName $BlobName
This example initiates an export process from the Azure SQL Database that has the name stored in the $DatabaseName variable to the Blob storage stored in the $BlobName variable.
Parameters
-BlobName
Specifies the name of the Azure Blob storage into which this cmdlet exports the database.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-DatabaseName
Specifies the name of the database from which this cmdlet exports data.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Profile
Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.
Parameter properties
Type: | AzureSMProfile |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-SqlConnectionContext
Specifies the connection context of a server that contains the database.
Parameter properties
Type: | ISqlServerConnectionInformation |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-StorageContainer
Specifies the storage container that contains the Blob into which this cmdlet export a database.
Parameter properties
Type: | AzureStorageContainer |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ByContainerObject
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-StorageContainerName
Specifies the name of the storage container that contains the Blob into which this cmdlet exports a database.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ByContainerName
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-StorageContext
Specifies the context of the Blob storage container.
Parameter properties
Type: | IStorageContext |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ByContainerName
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
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.