IMD SolutionComputing LibraryShop main store

Explainer

Connect on-premise OPC UA and SQL servers to a cloud PI System

Edge computing and IIoT Published 8 min read

Short answer

Yes. Install the AVEVA adapters on-premise, on a small host next to the OPC UA and SQL servers, and point egress at PI Web API in the cloud; the PI Data Archive port is not a supported egress destination. Only the adapter-to-Web API direction needs an outbound route.

On this page
  1. Can on-premise OPC UA and SQL servers feed a cloud PI System?
  2. Where should the PI Adapters be installed?
  3. Can the adapters run on the cloud AF and Data Archive VM instead?
  4. Is PI Web API required, or can egress use the Data Archive port?
  5. Which firewall rules does this architecture need?
  6. How much bandwidth does the delivery link need?
  7. How do you prove each connection before enabling collection?
  8. What should you check when PI values go stale?
  9. Questions asked

Yes — run the adapters on-premise, point their egress at PI Web API in the cloud, and open exactly three outbound routes from the plant: TCP 4840 to your OPC UA server, TCP 1433 to your SQL Server, and TCP 443 to the PI Web API VM. No inbound path exists anywhere in the design, and the Data Archive listener (TCP 5450) is never an egress destination — the adapters write to PI Server only through PI Web API. With AF and the Data Archive on one cloud VM and SQL and PI Web API on another, the plant side needs nothing but that one outbound HTTPS route.

Can on-premise OPC UA and SQL servers feed a cloud PI System? #

Yes — AVEVA's adapters exist for exactly this split: they collect time series data next to the sources and send it to a supported data archive across the network, an operation the vendor documents as data egress, so the plant and the cloud never need to share a network.

No Edge product is needed for the connection itself; the two adapters are the supported path. PI Adapter for OPC UA talks to your OPC UA server and reads the nodes you select; PI Adapter for RDBMS runs configured queries against the SQL database and turns each result row into a timestamped event. Both deliver through one mechanism, sending collected data to a supported permanent endpoint, and the documented endpoint list includes AVEVA PI Server through PI Web API. Internet access on the source servers is not the enabler — the enabler is a collector on the plant network with one outbound route to the cloud.

Where should the PI Adapters be installed? #

On-premise, on a host next to the OPC UA and SQL servers — a small VM in the same data center is the standard answer when co-hosting on the source machines is not wanted, because the collector belongs as close to the data source as possible.

Close placement keeps the OPC UA sessions and the database queries on the plant LAN, where latency, reliability and certificate handling are yours to control, and it means a cloud outage pauses delivery without stopping collection. Install both adapters on one dedicated host — a small virtual machine in the same data center as the sources is the standard answer. Keep collector software off the production source servers: an OPC UA server and a database engine are load-bearing services that should not take on someone else's workload. If another VM is not on the table, a fanless mini PC on the plant network takes the same role. This is the same placement logic as bridging OPC UA PLC data to MQTT with an edge PC — the collector sits where the data is born, not where it is stored.

Can the adapters run on the cloud AF and Data Archive VM instead? #

They can, and the collection will work, but you should not: cloud placement forces the cloud VM to initiate connections back into the plant to reach both source servers, reverses every firewall assumption, and puts collector load on the machine that hosts your Data Archive.

Cloud placement makes the AF and Data Archive VM reach back into the plant to open an OPC UA session on one server and a database session on another, so a firewall that has only ever seen outbound traffic must now accept two cloud-originated inbound paths. The internet access both source servers have proves nothing here: outbound access never creates an inbound route, so the tempting argument — the sources are online, therefore the cloud adapter can reach them — is false. You would also add collector load, certificate trust and restart windows to the machine running your Data Archive.

One safety note: if cloud placement is ever forced on you, scope the inbound rules to exactly the two source endpoints from exactly the adapter VM, never to a whole plant VLAN. The decision stands: install the adapters on-premise unless your security model explicitly permits cloud-initiated sessions into OT.

Is PI Web API required, or can egress use the Data Archive port? #

PI Web API is mandatory: the adapters write to PI Server only through PI Web API, and the Data Archive listener is not an egress destination — pointing the adapter's egress at the Data Archive port does not turn an API client into a native Archive writer.

The adapter documentation states it directly — supported egress destinations include AVEVA PI Server through PI Web API — and the system requirements for the current adapter release call for PI Web API 2021 or later. Delivery rides PI Web API's OMF endpoint: the adapters send collected data to an OMF endpoint, and Web API hands it into the Data Archive. That is why repointing egress at the Data Archive's listener (TCP 5450 on a default installation) accomplishes nothing — the adapter speaks an HTTPS, OMF-based protocol to Web API, not the Archive's native protocol, so a port swap is not a compatibility switch. Even co-hosted on the AF and Data Archive VM, the adapter's egress configuration would still name the Web API endpoint.

One design number to carry: field reports put the practical ceiling of the OMF-through-Web-API path toward a Data Archive near 100,000 data streams — a reported figure, not a documented one, so size your tag count against the PI Web API release you run. The endpoint list includes destinations other than PI Server; if you want buffering with local storage at the plant, that is the role Edge Data Store fills, and it deploys in Docker on a controller PC.

Which firewall rules does this architecture need? #

Three connections carry the plant's data: OPC UA and SQL Server sessions from the adapter host to each source (1433 and 4840 by default), and one outbound HTTPS session to PI Web API (443 unless moved); nothing initiates inbound.

Connection From To Port Zone
OPC UA collection Adapter host On-premise OPC UA server TCP 4840 by default Plant LAN
Database collection Adapter host On-premise SQL Server TCP 1433 (default instance) Plant LAN
Data egress Adapter host Cloud PI Web API VM TCP 443 (HTTPS) Plant to cloud, outbound only
Archive write PI Web API VM Data Archive and AF VM TCP 5450 on a default install Inside the cloud

Only row three crosses to the internet, and only outbound: if your security model allows one designated collector host to open HTTPS toward the cloud, every other row lives on networks you already govern. A default SQL instance listens on 1433; a named instance picks a dynamic port and is reached through the SQL Browser service on UDP 1434 unless you pin the instance to a fixed port — pin it, then open exactly that port. The Archive's 5450 belongs to Web API's own writes, never to the adapters.

Budget roughly 8 Mbit/s of steady outbound HTTPS for 2,000 tags reporting once per second at 0.5 kB per event — about 1 MB/s — and hold the tag count far under the six-figure stream limits the Web API delivery path is reported to hit.

Worked example — is a 10 Mbit/s circuit enough? Take an illustrative load of 2,000 tags reporting once per second at an average of 0.5 kB per delivered event (a planning guess; read the real average from the adapter diagnostics after a day of running). Delivery per second: 2,000 tags × 0.5 kB = 1,000 kB = 1 MB. At 8 bits per byte, 1 MB/s = 8 Mbit/s of steady HTTPS. On a 10 Mbit/s uplink that is 80% utilization before retries or flushes — not acceptable; on 100 Mbit/s it is 8%, comfortable. The same 2,000 streams sit 50× under the roughly 100,000-stream figure from the section above. At 1 kB per event the load doubles to 16 Mbit/s, which flips the decision on the smaller circuit — so decide on the measured payload, not on the guess.

How do you prove each connection before enabling collection? #

Test from the adapter host, not your workstation: name resolution for each source and for PI Web API, a TCP connect to each configured port, an OPC UA browse with the adapter's certificate trust, and one query execution with the adapter's database login.

A pass from your workstation proves nothing: it sits on another VLAN, holds different credentials and may resolve different names. Run the checks on the adapter host itself, in this order:

  1. Resolve each source hostname and the PI Web API hostname the way the adapter will resolve them.
  2. Open a TCP connection to each configured port — the source ports first, then 443 toward the Web API VM.
  3. Browse the OPC UA namespace with the adapter's certificate trust and credentials, not an administrator's.
  4. Execute one configured query under the adapter's database login and check that the rows are the ones you expect.
  5. Configure a small, identifiable tag set, enable egress, and confirm the values land in PI before widening the selection.

If the database path drops after go-live, the recovery sequence is the one in reconnect an edge PC to SQL Server after connection loss.

What should you check when PI values go stale? #

Work backward from the timestamp: if the PI point has a recent timestamp with a stale value the delivery chain is fine and the fault sits at the source or the mapping, and if the timestamp itself is frozen the collection or egress link is down.

Then narrow by scope:

  • Every tag from both adapters freezes — shared layer: the host itself, its route, or the egress side.
  • One adapter's tags freeze while the other keeps updating — that adapter's source session or delivery channel.
  • A single OPC UA node goes stale — the node moved, its quality collapsed, or its credentials changed.
  • The query returns rows but no events appear — mapping or timestamp handling inside the adapter's query definition.
  • The PI point is current but the display is not — the display's binding, not the pipeline.

Separate tag faults from binding faults: a healthy value mapped to the wrong PI point looks exactly like a dead collection link. Change one layer at a time and re-check the point after each change, because two simultaneous edits hide which one mattered.

Questions asked

Do both adapters deliver through PI Web API?

Yes, both. The OPC UA adapter and the RDBMS adapter use the same egress model: each sends its collected data to PI Server through PI Web API, so the cloud Web API VM serves both, and its capacity has to cover the two adapters' combined stream count. Check each adapter version against the Web API version you run.

Can the OPC UA and RDBMS adapters share one on-premise host?

Yes, and that is the point of the dedicated host. The two adapters run side by side on one on-premise machine and stay independent: each has its own source configuration, credentials and diagnostics, so a bad database login does not stop OPC UA collection. Size the host for both adapters' requirements plus growth.

What happens to collected data while the cloud link is down?

Collection on the plant side is meant to keep running: the adapters read the sources over the LAN and delivery catches up when the HTTPS path to PI Web API returns. Do not assume an unlimited buffer, though — buffering capacity is version-specific, so after any outage compare stored-versus-delivered counts in the adapter's diagnostics.

What database rights does the RDBMS adapter need?

Give the adapter its own login, not a database administrator account. Read access to exactly the tables and views the configured queries touch is enough; write access on the source system buys nothing. Keep those credentials separate from the OPC UA account and from the PI Web API credentials, so one leaked secret cannot open every door.

Keep reading

  • How-to

    Deploying Edge Data Store in Docker on a controller PC

    Run Edge Data Store as a Docker container on the controller-class edge PC and let its OPC UA adapter ingest the local server over localhost. Define egress targets, buffering and forwarding schedules in the JSON configuration, size the buffer from tag count, scan rate and outage target—50 tags at 1 event/s across an 8-hour outage is about 288 MB—and sign off only after a live pulled-cable test.

    Edge computing and IIoT

  • Comparison

    PLC to SQL Server: REST API or direct database access

    Choose a REST API in front of SQL Server when the data carries business rules, and an external collector that reads the controller when the database is only a repository. Keep SQL out of the PLC. The deciding test: classify each exchange as event, lookup or stream, and pick the path whose owner commits the transaction and acknowledges back to the controller.

    Edge computing and IIoT

  • How-to

    Backfilling PI from an existing plant historian

    Split the historian-to-PI backfill into four independent stages — extract, intermediate store, external compression, destination load — and qualify throughput with a measured pilot. Rows divided by elapsed seconds, not tag count, sets the schedule: 12,000 tags from 2020 at 500 rows/s is about 203 days. Check the native Historian 2023 replication route before writing pipeline code.

    Edge computing and IIoT