Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL Server list restorable databases and recoverable databases fails #10162

Closed
yupwei68 opened this issue Jul 16, 2020 · 5 comments
Closed

SQL Server list restorable databases and recoverable databases fails #10162

yupwei68 opened this issue Jul 16, 2020 · 5 comments
Labels
Service Attention Workflow: This issue is responsible by Azure service team. SQL

Comments

@yupwei68
Copy link
Contributor

I have requests to list restorable and recoverable databases. The resource group and the sql server always exist. Sometimes it returns success, sometimes it returns "resource group not found", sometimes it returns "sql server not found".

Would you mind taking a look?

  1. get recoverable databases
    Get https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/acctestRG-mssql-yup/providers/Microsoft.Sql/servers/acctestsqlserveryup/recoverableDatabases?api-version=2014-04-01

{
"error": {
"code": "ResourceGroupNotFound",
"message": "Resource group 'acctestRG-mssql-yup' could not be found."
}
}

  1. get restorable databases
    Get https://management.azure.com/subscriptions/{{subscriptionId}}/resourceGroups/acctestRG-mssql-yup/providers/Microsoft.Sql/servers/acctestsqlserveryup/restorableDroppedDatabases?api-version=2014-04-01
    {
    "error": {
    "code": "ResourceGroupNotFound",
    "message": "Resource group 'acctestRG-mssql-yup' could not be found."
    }
    }
@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jul 16, 2020
@yupwei68 yupwei68 changed the title SQL Server list restorable databases and recoverable databases error SQL Server list restorable databases and recoverable databases fails Jul 16, 2020
@xseeseesee xseeseesee added the SQL label Jul 16, 2020
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jul 16, 2020
@xseeseesee xseeseesee added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. Service Attention Workflow: This issue is responsible by Azure service team. labels Jul 16, 2020
@ghost
Copy link

ghost commented Jul 16, 2020

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azureSQLGitHub.

@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jul 16, 2020
@xseeseesee
Copy link
Contributor

@yupwei68 I just add label for the issue you are facing. We will need help from sql service team. Thanks.

@yupwei68
Copy link
Contributor Author

And the go sdk raises error: StatusCode=404 -- Original Error: json: cannot unmarshal array into Go struct field serviceError2.details of type map[string]interface {}

@yupwei68
Copy link
Contributor Author

Currently I can reproduce this error only on sql server listing recovery databases. After you have created a sql server, and you list the recovery databases. It shows error:

{
    "code": "40647",
    "message": "Subscription '...' does not have the server 'yupsql3'.",
    "target": null,
    "details": [
        {
            "code": "40647",
            "message": "Subscription '.... does not have the server 'yupsql3'.",
            "target": null,
            "severity": "16"
        }
    ],
    "innererror": []
}

@yupwei68
Copy link
Contributor Author

Tilak has helped to investigate the recoverable databases api. It appears it's one feature of the recoverable databases, which get data from the secondary region. Thus, it might takes couple of minutes or couple of hours to synchronize the data to the recoverable databases api.

katbyte pushed a commit to hashicorp/terraform-provider-azurerm that referenced this issue Sep 21, 2020
…ped_databases` in `azuerrm_mssql_server` (#7917)

Fix #6502
#7594

=== RUN TestAccAzureRMMsSqlDatabase_createRestoreMode
=== PAUSE TestAccAzureRMMsSqlDatabase_createRestoreMode
=== CONT TestAccAzureRMMsSqlDatabase_createRestoreMode
--- PASS: TestAccAzureRMMsSqlDatabase_createRestoreMode (2016.02s)

Sql server listing recoverableDatabases Api has problems, thus it's excluded in the PR: Azure/azure-rest-api-specs#10162
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Service Attention Workflow: This issue is responsible by Azure service team. SQL
Projects
None yet
Development

No branches or pull requests

2 participants