JSON script sent via SSMS unable to delete a corrupted database in Azure Analysis Services

This article helps you work around the problem where you may be unable to delete a corrupted database in Azure Analysis Services by using JavaScript Object Notation (JSON) script in Microsoft SQL Server Management Studio (SSMS).

Applies to:   Analysis Services
Original KB number:   4460002

Symptoms

You may be unable to delete a corrupted database in Azure Analysis Services by using JavaScript Object Notation (JSON) script in Microsoft SQL Server Management Studio (SSMS). When you try to do this, you may receive any of the following error messages from the corrupted database:

Message: Storage blob does not exist: '\\?\Root\DatabaseName.0.db\......'
A duplicate value has been detected in the Unique Value store associated with the dictionary The given credential is missing a required property. Data source kind: SQL. Authentication kind: UsernamePassword. Property name: Password
Cannot execute the Delete command: database 'Database' cannot be found

Workaround

To work around this issue, run an XML for Analysis (XMLA) query in SSMS to delete the corrupted database:

<Delete xmlns="[https://schemas.microsoft.com/analysisservices/2003/engine](https://schemas.microsoft.com/analysisservices/2003/engine)"
    IgnoreFailures="true" >
    <Object>
        <DatabaseID>DatabaseID```</DatabaseID>
    </Object>
</Delete>