Microsoft SQL Server AI Ontology & On-Prem MCP Server
Microsoft SQL Server powers the majority of industrial ERP, retail POS and plant MES deployments, often across multi-database instances where foreign keys were never declared in sys.foreign_keys and collations such as Turkish_CI_AS break naive string filters. Naditu runs inside your Windows/Linux network, reads cleanly under snapshot isolation without locking operational tables, and enforces field-level governance.
Always On Read Replica · Read-Only Login · Snapshot Isolation
Raw T-SQL writes blocked · Routed to official application APIs
Canonical ontology mapping
Business objects & field-level governance.
Instead of exposing raw physical tables to an LLM, Naditu assembles governed domain objects and enforces caller role policies at query time.
Cross-Database Business Entity
Physical tables / entitiesERP_DB.dbo.* · MES_DB.dbo.* · WMS_DB.dbo.*Governance & masking ruleCompany, plant & branch row filters mapped from Active Directory / Entra IDCommercial Ledger & Receivables
Physical tables / entitiesCustomer · InvoiceHeader · InvoiceLine · PaymentLedgerGovernance & masking ruleCost, rebate & credit risk fields masked by departmentProduction & Shop-Floor Order
Physical tables / entitiesWorkOrder · RoutingStep · MaterialConsumptionGovernance & masking ruleStandard labor & overhead rates restricted to Finance & PlanningWarehouse & Lot Stock
Physical tables / entitiesStockBalance · LotSerial · WarehouseTransferGovernance & masking rulePurchase price masked for floor and logistics roles
| Business object | Physical tables / entities | Governance & masking rule |
|---|---|---|
| Cross-Database Business Entity | ERP_DB.dbo.* · MES_DB.dbo.* · WMS_DB.dbo.* | Company, plant & branch row filters mapped from Active Directory / Entra ID |
| Commercial Ledger & Receivables | Customer · InvoiceHeader · InvoiceLine · PaymentLedger | Cost, rebate & credit risk fields masked by department |
| Production & Shop-Floor Order | WorkOrder · RoutingStep · MaterialConsumption | Standard labor & overhead rates restricted to Finance & Planning |
| Warehouse & Lot Stock | StockBalance · LotSerial · WarehouseTransfer | Purchase price masked for floor and logistics roles |
Why raw SQL & generic MCP fail
Three physical schema traps solved in the layer.
Every operational system carries implicit join keys, status discriminators and multi-company rules that ungrounded Text-to-SQL guesses wrong.
- 01
Turkish_CI_AS dotless-i (ı/İ) collation and legacy CP1254 varchar columns
Upper/lowercasing status codes like iade or İrsaliye in standard ASCII folds wrong characters on Turkish_CI_AS instances. Naditu preserves collation-aware predicates and encoding normalization.
- 02
Zero declared sys.foreign_keys across thousands of ERP tables
Commercial ERPs running on SQL Server enforce joins in compiled application code rather than database constraints. Naditu captures and verifies those cross-table and cross-database links.
- 03
Shared-lock blocking on busy OLTP tables
Unbounded analytical queries on primary SQL Server instances stall POS and shop-floor transactions. Naditu targets Always On readable secondaries or READ COMMITTED SNAPSHOT views with strict timeouts.
Common engineering questions.
Does Naditu prevent lock contention on busy SQL Server ERP databases?
Yes. We recommend Always On readable secondaries or log-shipped/replicated read instances, paired with non-blocking isolation, query timeouts and row caps.
Can one Naditu instance join multiple SQL Server databases on different hosts?
Yes. Naditu federates across separate SQL Server instances (for example ERP on one server and ProManage or Trex MES on another) without linked-server security risks.
Are stored procedures or views supported as ontology sources?
Yes. Existing IT-approved SQL views and read-only reporting functions can back ontology objects directly.
Engineering deep dives
Related architecture notes from the blog.
Wren AI and Vanna AI Text-to-SQL alternative for ERP data
Comparing Wren AI (MDL + DataFusion) and Vanna AI (RAG DDL vectors) against an enterprise ontology for live multi-ERP queries, RBAC, and write gates.
Connecting Logo Tiger and Netsis ERP to AI safely
How to connect Logo Tiger, GO and Netsis 3 to AI agents: SQL read guards, Logo Objects REST limits, TRCODE traps and human-approved write gates.