Start-AzureSqlDatabaseExport

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

Syntax

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

Parameters

-SqlConnectionContext

Specifies the connection context of a server that contains the database.

Type:ISqlServerConnectionInformation
Required:True
Position:0
Default value:None
Accept pipeline input:False

-StorageContainer

Specifies the storage container that contains the Blob into which this cmdlet export a database.

Type:AzureStorageContainer
Required:True
Position:1
Default value:None
Accept pipeline input:False

-DatabaseName

Specifies the name of the database from which this cmdlet exports data.

Type:String
Required:True
Position:2
Default value:None
Accept pipeline input:False

-BlobName

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

Type:String
Required:True
Position:3
Default value:None
Accept pipeline input:False

-StorageContext

Specifies the context of the Blob storage container.

Type:AzureStorageContext
Required:True
Position:1
Default value:None
Accept pipeline input:False

-StorageContainerName

Specifies the name of the storage container that contains the Blob into which this cmdlet exports a database.

Type:String
Required:True
Position:2
Default value:None
Accept pipeline input:False

-Profile

ps_azureprofile_description

Type:AzureSMProfile
Position:Named
Default value:None
Accept pipeline input:False

Outputs

Microsoft.WindowsAzure.Commands.SqlDatabase.Services.ImportExportRequest