<!-- llms-explorer concept facts · https://llms-explorer.com/tree/atlas-sql-schema-builder/ · pack 2026-10-24 · ~1562 tokens -->

# Atlas SQL Schema Builder

> Source-anchored research for Atlas SQL Schema Builder. Run status: COMPLETED.

Parent: [Atlas SQL Interface MongoSQL](https://llms-explorer.com/tree/atlas-sql-interface-mongosql/) · 5 facets · 21 facts · page: https://llms-explorer.com/tree/atlas-sql-schema-builder/

## Structure and components

- SQL Interface schemas describe document structure, including polymorphism, sparse fields and nested data, and provide metadata for SQL-to-MongoDB translation. (high confidence) — [source](https://www.mongodb.com/docs/sql-interface/schema/schema-builder-cli.md)

## How it works

- Schemas reside in each database's reserved __sql_schemas collection; the mongosql CLI can read this collection when translating queries. (high confidence) — [source](https://www.mongodb.com/docs/sql-interface/schema/schema-builder-cli.md)
- The broad no-sampling description has a view-specific exception: the CLI derives view schemas from pipelines and source schemas, but executes and samples view output when derivation is unavailable. (low confidence) — [source](https://www.mongodb.com/docs/sql-interface/schema/schema-builder-cli.md)
- The default action is merge; overwrite replaces existing schemas, while clear removes the schema field. Unstable schemas require overwrite because merge leaves them unchanged. (low confidence) — [source](https://www.mongodb.com/docs/sql-interface/schema/schema-builder-cli.md)

## Problems, failure modes and limitations

- CLI-generated schemas and Atlas Data Federation schemas are separate and cannot be reused across those deployment paths. (low confidence) — [source](https://www.mongodb.com/docs/sql-interface/schema-management.md)

## Comparisons and alternatives

- Collection schema generation analyzes every document rather than sampling; view inference can fall back to sampling view output. (low confidence) — [source](https://www.mongodb.com/docs/sql-interface/schema/schema-builder-cli.md)
- For collections, the CLI analyzes every document rather than inferring a schema from a sample. (high confidence) — [source](https://www.mongodb.com/docs/sql-interface/schema/schema-builder-cli.md)

## Facts and statements

- Atlas dedicated clusters M10 and above use the MongoDB SQL Schema Builder CLI for schema management; the same CLI also serves self-managed Enterprise Advanced deployments. (high confidence) (verified as of 2026-09-29) — [source](https://www.mongodb.com/docs/sql-interface/schema/schema-builder-cli.md)
- Schema refresh is user-initiated. Regenerate after data-shape changes; periodic refresh requires external scheduling such as cron. (low confidence) — [source](https://www.mongodb.com/docs/sql-interface/schema/schema-builder-cli.md)
- Highly polymorphic collections can produce unstable schemas with capped fields and additionalProperties=true; default merge skips them, so refresh requires overwrite. (low confidence) — [source](https://www.mongodb.com/docs/sql-interface/schema/schema-builder-cli.md)
- The binary is mongodb-schema-manager. Namespace include/exclude flags select work; dry-run checks those patterns without schema analysis or database writes. (low confidence) — [source](https://www.mongodb.com/docs/sql-interface/schema/schema-builder-cli.md)
- Atlas dedicated-cluster generation requires SQL Interface enablement and read access to __mdb_internal_sqlinterface; schema writes additionally require find, insert and update on __sql_schemas. (medium confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/sql-interface/schema/schema-builder-cli.md)
- CVE-2026-19502 concerns plaintext authentication settings in CLI diagnostic output. MongoDB lists versions 1.0.0 through versions below 1.2.1 as affected. (medium confidence) (verified as of 2026-08-12) — [source](https://www.mongodb.com/resources/products/alerts)
- The July 9, 2026 changelog says CLI 1.2.1 redacts connection strings and passwords and fixes unchecked protocol-handler launch. (low confidence) (verified as of 2026-07-09) — [source](https://www.mongodb.com/docs/sql-interface/changelog.md)
- MongoDB's security alerts separately identify unchecked OIDC endpoint schemes as CVE-2026-19503, affecting CLI 1.0.1 through versions below 1.2.1. (low confidence) (verified as of 2026-08-12) — [source](https://www.mongodb.com/resources/products/alerts)
- The binary is mongodb-schema-manager. It writes one schema document per namespace to each database's __sql_schemas collection, which the documentation reserves for CLI management. (low confidence) — [source](https://www.mongodb.com/docs/sql-interface/schema/schema-builder-cli.md)
- Highly polymorphic documents can yield unstable schemas with capped field capture and additionalProperties=true; those schemas may incompletely represent their namespace. (low confidence) — [source](https://www.mongodb.com/docs/sql-interface/schema/schema-builder-cli.md)
- Namespace include and exclude flags accept glob patterns, exclusion wins, and --dry-run checks namespace selection without analyzing schemas or writing to the database. (low confidence) — [source](https://www.mongodb.com/docs/sql-interface/schema/schema-builder-cli.md)
- The CLI needs read access to processed databases plus find, insert and update on __sql_schemas; dedicated-cluster use additionally needs read access to __mdb_internal_sqlinterface. (low confidence) — [source](https://www.mongodb.com/docs/sql-interface/schema/schema-builder-cli.md)
- MongoDB's security alerts identify CVE-2026-19502 as plaintext diagnostic disclosure affecting Schema Builder CLI versions from 1.0.0 before 1.2.1. MongoDB's July 9, 2026 changelog records credential redaction in 1.2.1, and CERT-In also lists pre-1.2.1 versions as affected. (high confidence) (verified as of 2026-08-17) — [source](https://www.mongodb.com/resources/products/alerts)
- MongoDB's security alerts assign the OIDC endpoint-validation defect to CVE-2026-19503 and list Schema Builder CLI versions from 1.0.1 before 1.2.1 as affected. The changelog instead groups the protocol-handler and credential-redaction fixes under CVE-2026-19502, so the CVE attribution needs care. (high confidence) (verified as of 2026-08-12) — [source](https://www.mongodb.com/resources/products/alerts)
