# Microsoft SQL Server AI Ontology & On-Prem MCP Server

Canonical URL: https://naditu.com/connectors/sql-server
Category: Databases & Warehouses
Read path: `Always On Read Replica · Read-Only Login · Snapshot Isolation`
Write gate: `Raw T-SQL writes blocked · Routed to official application APIs`

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.

## Business objects & field-level governance.

- **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

## Three physical schema traps solved in the layer.

1. **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.
2. **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.
3. **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.
