sqlmc list coverage: Production consent
A group holding a production database is refused before any connection is opened.
A group holding a production database is refused before any connection is opened. The plan exists precisely so that question is answerable without having opened the connections it is a question about.
$ sqlmc list coverage --list "All Prod"
All Prod includes 4 of 12 database(s) flagged production:
sql-prod-01.Sales
sql-prod-01.Ops
sql-prod-02.Sales
sql-prod-02.Ops
Nothing was connected to. Re-run with --yes to agree to these connections.
$ echo $?
2
It names every production member rather than counting them, because agreeing to "four databases" is not agreeing to anything in particular.
It is --yes and not --force, deliberately. This answers a question that has already listed its
subject; "force" would suggest overriding a check rather than answering one.
Under --json the same refusal arrives as a plan:
{
"schema": 2, "command": "list coverage", "ok": false,
"data": {
"list": "All Prod",
"confirmationRequired": true,
"targetCount": 12,
"alreadyCached": 9,
"productionTargets": [
{ "connection": "sql-prod-01", "database": "Sales", "isProduction": true }
],
"scanned": 0, "failed": 0, "cancelled": false, "findings": []
},
"errors": []
}