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
Start-AzureSqlDatabaseExport
-SqlConnectionContext <ISqlServerConnectionInformation>
-StorageContainer <AzureStorageContainer>
-DatabaseName <String>
-BlobName <String>
[-Profile <AzureSMProfile>]
[<CommonParameters>]
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.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DatabaseName
Specifies the name of the database from which this cmdlet exports data.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | 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.
Type: | AzureSMProfile |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SqlConnectionContext
Specifies the connection context of a server that contains the database.
Type: | ISqlServerConnectionInformation |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageContainer
Specifies the storage container that contains the Blob into which this cmdlet export a database.
Type: | AzureStorageContainer |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageContainerName
Specifies the name of the storage container that contains the Blob into which this cmdlet exports a database.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StorageContext
Specifies the context of the Blob storage container.
Type: | IStorageContext |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Outputs
Microsoft.WindowsAzure.Commands.SqlDatabase.Services.ImportExportRequest