-
Notifications
You must be signed in to change notification settings - Fork 4.1k
SQL v12 Preview - Start-AzureSqlDatabaseExport doesn't like the connection context #136
Copy link
Copy link
Closed
Labels
SQLService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.
Description
Using the sample "Example 1" in the documentation (https://msdn.microsoft.com/en-us/library/azure/dn546720.aspx), against a v12 preview SQL Azure database server, I am getting this error:
Start-AzureSqlDatabaseExport : Cannot bind parameter 'SqlConnectionContext'. Cannot convert the
"Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.TSqlConnectionContext" value of type
"Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.TSqlConnectionContext" to type
"Microsoft.WindowsAzure.Commands.SqlDatabase.Services.Server.ServerDataServiceSqlAuth".
At line:10 char:69
+ $exportRequest = Start-AzureSqlDatabaseExport -SqlConnectionContext $SqlCtx -Sto ...
+ ~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Start-AzureSqlDatabaseExport], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.WindowsAzure.Commands.SqlDatabase.Database.Cmdlet.StartAzureSqlDatabaseExport
Here's the code (keys & server names scrubbed):
$StorageName = "SCRUBBED"
$StorageKey = "SCRUBBED"
$BlobName = "SCRUBBED"
$ServerName = "SCRUBBED"
$DatabaseName = "SCRUBBED"
$credential = Get-Credential
$SqlCtx = New-AzureSqlDatabaseServerContext -ServerName $ServerName -Credential $credential
$StorageCtx = New-AzureStorageContext -StorageAccountName $StorageName -StorageAccountKey $StorageKey
$Container = Get-AzureStorageContainer -Name $ContainerName -Context $StorageCtx
$exportRequest = Start-AzureSqlDatabaseExport -SqlConnectionContext $SqlCtx -StorageContainer $Container -DatabaseName $DatabaseName -BlobName $BlobName
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
SQLService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.