← All use cases

OPC UA to SQL Database

Turn selected OPC UA values into trustworthy, query-ready SQL records—without placing database logic inside the control network.

Industrial data, structured for the systems that use it.

OTDataMule reads only the nodes you select, applies a consistent data model and writes timestamped records to an approved SQL destination. Local buffering and controlled retries keep the flow dependable when networks or databases are unavailable.

OPC UA ServerPLC · SCADA · Machine
OTDataMuleRead · Normalize · Buffer
SQL DatabaseHistorian · MES · Analytics
DATA PIPELINE

From OPC UA tags to reliable SQL records

OTDataMule subscribes to approved OPC UA nodes, preserves source context and converts each update into a governed relational record. Persistent buffering separates plant availability from database availability.

1
OPC UA ServerPLC gateway · SCADA · machine server · historian
ns=2;s=Line1.Speedns=2;s=Line1.Tempns=4;s=Batch.ID
SubscriptionValue · source timestamp · quality
2
Collect and governAllow-list · security policy · sampling · deadband
Node mappingNamespace handlingQuality rulesEngineering units
NormalizeStable record model
3
Transform for SQLRename · cast · enrich · route
asset_idtag_namevaluesource_timequality
StorePersistent queue
4
Buffer and batchDisk-backed queue · retry · ordering · capacity alarms
WriteParameterized batches
5
SQL DatabaseSQL Server · PostgreSQL · MySQL-compatible destination
timestampassettagvaluequality
When SQL is offlineSubscriptions continue and approved records accumulate in the persistent queue.
When SQL returnsControlled batches replay in order without re-querying the OPC UA source.
Reference flow. Subscription intervals, deadbands, queue capacity, schema design and write strategy must be sized for the actual tag count and update rate.
SUBSCRIPTIONPrefer event-driven updates

Use monitored items and publishing intervals instead of aggressive repeated reads where the server supports them.

CONTEXTPreserve source meaning

Keep the source timestamp, status code, engineering unit and stable asset identity with every value.

DATABASEWrite safely and efficiently

Use parameterized statements, controlled batches and deterministic keys appropriate to the destination schema.

FreshnessLatest source timestamp delivered
Queue depthPending records and oldest age
Rejected rowsSchema, type and constraint failures
Write rateRows per batch and per second

A controlled path from tag to table.

01 — Select

Choose OPC UA nodes

Collect only the process values, status fields and timestamps required by the use case.

02 — Normalize

Shape each record

Map source values to consistent names, types, units and quality metadata.

03 — Protect

Buffer and retry

Queue records locally during interruptions and resume delivery without losing sequence.

04 — Store

Write to SQL

Insert structured data into the approved schema for reporting and downstream applications.

Built for operational reality.

Quality-aware records

Preserve source timestamps and OPC UA quality information so consumers can interpret every value correctly.

Database isolation

Keep SQL credentials and write behavior controlled at the integration layer instead of distributing them across machines.

Predictable load

Use deliberate sampling, deadbands and batching to avoid noisy polling and unnecessary database growth.

Resilient delivery

Store-and-forward behavior reduces gaps when the IT destination is temporarily unreachable.

Reusable schema

Give BI, MES and analytics teams a stable structure instead of source-specific tag conventions.

Observable flow

Monitor connection state, queue depth and write outcomes to make data delivery measurable.

Typical deployment boundary

OT side

  • Read-only OPC UA access where possible
  • Explicit node allowlist and sampling policy
  • Local queue sized for expected outages

IT / application side

  • Least-privilege SQL service account
  • Approved schema, retention and indexing
  • Monitoring for latency and failed writes

Validate the flow with your own tags.

Start with one machine, one dataset and one measurable outcome.

Discuss your OPC UA to SQL use case