Forum Discussion
Azure SQL Mirrored DB says "metadata tables are corrupted" when stopping then restarting replication
- 1 year ago
I heard back from MS support. TL;DR: you need to grant VIEW PERFORMANCE DEFINITION to the managed identity fabric is using to connect to the db:
GRANT SELECT, ALTER ANY EXTERNAL MIRROR, VIEW PERFORMANCE DEFINITION TO [User];The official docs only mention the need for `SELECT, ALTER ANY EXTERNAL MIRROR`.
This does not fix a database that already has corrupted metadata, but it makes it so that the reproduction steps I mention in the first post do not generate a metadata corruption in the first place.
I believe MS is planning to push a fix for this before the end of the month, but I don't know whether that will be just an update to the documentation or a code fix that makes the "ANY EXTERNAL MIRROR" permission sufficient.
I raised a support case several days ago. Support confirmed that other users had reported a similar error and the product team is looking into it. A member of the product team was able to manually uncorrupt the metadata in my Azure SQL db, but I am still awaiting information about how/if I can do that for myself. And, in the interim, a different Azure SQL db has experienced metadata corruption in a slightly different scenario.
It has taken many days and I've received almost no useful information, despite following up with support almost daily. With the state of this technology and its support channel, I will likely need to find a different solution for this workload.
Hi nlucero,
Thank you for the update, and I truly appreciate you taking the time to share your continued experience.
You've clearly gone above and beyond in your investigation, and your findings have already helped others in the community understand and avoid this issue. At this point, continuing to work through your existing support ticket is the appropriate channel for resolution
In the meantime, I’ll continue monitoring this thread closely and will share any related community updates or documentation changes as they become available.
Thank you again for your detailed contributions they’re helping improve visibility into this important issue for the broader community.
If you feel any part of this discussion has been helpful, please consider clicking “Accept as Solution” so it can gain more visibility and assist others encountering similar challenges.
Thank you.