Fabio De Carli
Fabio De Carli

Reputation: 379

Azure SQL elastic pool not found for server

A few days ago, I have a problem with SQL elastic pool in Azure.

I have an application that copies a database that is in a SQL Elastic pool, after a few days in production, started to return the message:

{"code":"40857","message":"Elastic pool not found for server: 'XXX', elastic pool name: 'XXX'."}

I tried to make the copy by the web admin panel without success as well.

Get error log:

"properties": {
    "statusMessage": "{\"status\":\"Failed\",\"error\":{\"code\":\"ResourceOperationFailure\",\"message\":\"The resource operation completed with terminal provisioning state 'Failed'.\",\"details\":[{\"code\":\"40857\",\"message\":\"Elastic pool not found for server: 'XXX', elastic pool name: 'XXX'.\"}]}}",
    "statusCode": "Accepted",
    "serviceRequestId": "XXX"
}

I have checked all the information, and they are correct! It was working and stopped.

Help me please

Upvotes: 0

Views: 1754

Answers (1)

Alberto Morillo
Alberto Morillo

Reputation: 15668

Let me provide you workarounds since I do not know why it stopped working. Please try using PowerShell as a workaround.

New-AzureRmSqlDatabaseCopy 
-ResourceGroupName “source” 
-ServerName “source” 
-DatabaseName “source” 
-CopyResourceGroupName “target” 
-CopyServerName “target” 
-CopyDatabaseName “target” 
-ElasticPoolName “target”

Try specifying the -ElasticPoolName and without that parameter.

If the above does not work, move the database into a standalone performance level then copy it.

Set-AzureRmSqlDatabase -ResourceGroupName $resourcegroupname `
    -ServerName $servername `
    -DatabaseName $firstdatabasename `
    -RequestedServiceObjectiveName "S0"

Upvotes: 0

Related Questions