Start-​Azure​Sql​Database​Export

Starts an export operation from an Azure SQL Database to Blob storage.

Syntax

Start-AzureSqlDatabaseExport
     -BlobName <String>
     -DatabaseName <String>
     [-Profile <AzureSMProfile>]
     -SqlConnectionContext <ISqlServerConnectionInformation>
     -StorageContainer <AzureStorageContainer>
     [<CommonParameters>]
Start-AzureSqlDatabaseExport
     -BlobName <String>
     -DatabaseName <String>
     [-Profile <AzureSMProfile>]
     -SqlConnectionContext <ISqlServerConnectionInformation>
     -StorageContainerName <String>
     -StorageContext <IStorageContext>
     [<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 -Credentials $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.

Required Parameters

-BlobName

Specifies the name of the Azure Blob storage into which this cmdlet exports the database.

Type:String
Position:Named
Default value:None
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
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
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
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
Accept pipeline input:False
Accept wildcard characters:False
-StorageContext

Specifies the context of the Blob storage container.

Type:IStorageContext
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-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
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Microsoft.WindowsAzure.Commands.SqlDatabase.Services.ImportExportRequest