IMDTouchKnowledge BaseShop main store

Troubleshooting

Why WinCC Flexible Logging Fails to Create Oracle Tables

HMI and touchscreens Published 6 min read

Short answer

Oracle is not among the databases tested and released for WinCC flexible, so the table-definition and insert statements the runtime generates were never validated there. The startup message covers only initialization. Archive to a released database and transfer committed records to Oracle with a separate, restart-safe service.

On this page
  1. What the startup message proves
  2. The compatibility boundary
  3. The diagnostic sequence that settles it
  4. The three fix paths
  5. Designing the transfer to Oracle
  6. Sizing the transfer: a worked example
  7. When direct Oracle logging is defensible
  8. Questions asked

WinCC flexible initializes its logs at runtime startup, and against Oracle that is where the good news ends: the message "log initialization ended, all logs ok" confirms only that the logging system's startup checks passed. Oracle is not on the list of databases tested and released for WinCC flexible, so the table-definition and insert statements the runtime generates were never validated against it — which is exactly why your Access and MS SQL Server logs work while Oracle stays empty. Reconfiguring the ODBC data source cannot fix this. The decision: archive to a released database and move the committed records into Oracle with a separate, restart-safe transfer service, unless Siemens support issues a written Oracle compatibility statement for your exact version.

What the startup message proves #

ODBC separates the logging path into independent operations, and the runtime walks them in order:

  • load the driver and resolve the data source name
  • authenticate and open a session
  • query database metadata
  • create the logging tables
  • insert samples
  • commit each transaction

The startup line is emitted when the logging system finishes initializing its own log definitions and connections — roughly the first three operations. A successful connection test in the ODBC administrator proves the same three. Neither exercises a table creation, an insert or a commit, and those are the operations Oracle is rejecting. The identical configuration succeeds against Access and MS SQL Server because those engines accept the SQL dialect, type mapping and catalog behavior the runtime generates; they are the engines it was built and released for.

The compatibility boundary #

The installed help for WinCC flexible names the databases tested and released for it:

  • MS Data Engine 97
  • MS Data Engine 2000
  • MS Access 97
  • MS Access 2000
  • MS SQL Server 7.0
  • MS SQL Server 2000

Oracle does not appear. ODBC standardizes the call-level interface — how a client opens a connection and submits statements — not the SQL dialect, identifier and casing rules, data type names, or catalog and schema behavior on the far side of the driver. A working ODBC connection to Oracle is therefore the expected result and carries no compatibility information. The failure signature — connection opens, first table-definition statement fails — is not Oracle-specific; the same class appears when historian table creation fails on MySQL over ODBC against a database the client was never validated for.

Stated plainly: direct Oracle logging in this runtime is an unvalidated integration, not a connection-configuration fault. Every hour spent recreating the data source, swapping credentials or changing driver settings retests the part of the path that already works.

The diagnostic sequence that settles it #

Run these before committing to an architecture change, because one environmental cause is real and correctable:

  1. Baseline the same log against Access or MS SQL Server and confirm the table appears and rows accumulate. This separates a broken archive configuration from an Oracle-specific failure.
  2. Test the exact data source, driver and account the runtime uses. A test made from another account proves nothing about the runtime's path.
  3. With the database administrator, create and drop a harmless test table in the intended schema using the runtime's account — on a test schema, never against production objects. This isolates missing object-creation privileges or a wrong default schema, the two faults you can fix by reconfiguration.
  4. Enable ODBC tracing, driver-level logging or database-side session diagnostics, restart the runtime, and capture the first rejected statement. The first error is the diagnostic; everything after it is cascade.
  5. Classify the rejected operation — catalog query, table creation, insert or commit — and read the token, data type or identifier the error names. Check identifier case and confirm schema visibility from the connected account's viewpoint, since objects can exist in a schema the account reaches but never inspects.

If step 3 fails, fix the privilege or the schema mapping and retest; that is the one case where the connection layer really was the answer. If the statement Oracle rejects is the runtime's generated SQL itself, stop reconfiguring and change the architecture.

The three fix paths #

Path Use when What it costs you
Archive directly to a released database Reliability and support dominate Data stays in the HMI-side engine until something else reads it
Released database plus a transfer service Oracle is the enterprise system of record You design, build and monitor one more service
Custom writer inside the runtime The standard archive path cannot be used at all Your code owns buffering, schema mapping, retries and recovery

For a production line, take the second path. The first strands the archive where the enterprise cannot query it, and the third keeps the entire compatibility burden and merely relocates it into a script — custom VB-script logging is a documented pattern in WinCC flexible projects, but the script inherits everything the archive engine normally guarantees. If the database work is leaving the panel anyway, the same reasoning applies when you log PLC data to SQL through a gateway rather than through the HMI for plant-wide requirements.

Designing the transfer to Oracle #

The service stays small if it is idempotent. Requirements:

  • Transfer only committed records from the released archive; never read a row the runtime may still revise.
  • Give every source record a stable identity — its log identity plus the source timestamp — and preserve that timestamp; the transfer time is not the process time.
  • Map every column explicitly to a declared Oracle type, a floating-point source column to BINARY_DOUBLE or a NUMBER with fixed precision for example, instead of trusting implicit conversion.
  • Read a bounded batch, write it in one transaction, and advance a durable checkpoint only after Oracle confirms the commit.
  • On failure, keep the checkpoint, record the rejected row and the database error, and retry the same batch; never skip forward silently.
  • Enforce a unique constraint on the source identity at the destination so a replay after a restart cannot create duplicates.

Sizing the transfer: a worked example #

Illustrative numbers — your tag count, cycle time and batch size set the result. One log records 8 tags on a 10-second acquisition cycle, so the archive gains 86,400 ÷ 10 = 8,640 rows per day, one row per cycle. With a 500-row batch, that is 8,640 ÷ 500 = 17.28, so 18 batches a day: 17 × 500 = 8,500 rows plus a final batch of 8,640 − 8,500 = 140. At one batch every 30 seconds the service occupies 18 × 30 s = 540 s, about 9 minutes of the day, a 540 ÷ 86,400 ≈ 0.6% duty cycle — trivial load for any small host.

Failure behavior: if the service stops after committing two batches, checkpoint at 1,000, and 200 rows into the third, the restart re-sends rows 1,001 through 1,200; rows already present collide with the unique constraint and are ignored, and the checkpoint advances to 1,500 only when the full batch commits. Decision at this scale: choose the batch for clean failure handling — 500 rows, one transaction — not for throughput; throughput is never the constraint here.

When direct Oracle logging is defensible #

Only with a written compatibility statement from Siemens support naming your exact WinCC flexible version and runtime. The released list is version-specific: read it in the installed help of the version you actually run, because a newer version's list says nothing about a 2005 Advanced runtime. On newer WinCC generations the database landscape differs — weigh the direct options for connecting WinCC to an external database before assuming this limit travels with the platform. Until such a statement exists, the released-archive-plus-transfer design is the supported shape, and it gives up nothing: the runtime logs where it was released to log, and Oracle receives exactly the committed records.

Questions asked

Is the runtime message proof that Oracle logging works?

No. It confirms the logging system finished its startup checks, which stop at opening connections. Nothing in that path proves Oracle accepted the table creation or the inserts that follow. Count rows on the Oracle side after a few acquisition cycles instead; the startup line and a permanently missing table are fully consistent with each other.

Which databases can WinCC flexible create its logging tables in?

The installed help for this version lists MS Data Engine 97 and 2000, MS Access 97 and 2000, and MS SQL Server 7.0 and 2000. That list is version-specific, so read it in the help of the version you actually run. Anything outside it needs a written compatibility statement from Siemens support before it counts as supported.

Can a VB script in the runtime write straight to Oracle instead?

Custom VB-script logging is a documented pattern in WinCC flexible projects, but the script then owns table creation, type mapping, buffering, retries and recovery — everything the archive engine normally guarantees. The Oracle client must also be present on the runtime PC. Prefer the Oracle-supplied ODBC driver over the legacy Microsoft one; it is the likelier route to statements that execute.

How do I keep the transfer service from duplicating rows after a restart?

Advance a durable checkpoint only after Oracle commits a batch, and put a unique constraint on the source identity — log identity plus source timestamp — at the destination. A restart resumes from the last checkpoint, and re-sent rows collide with the constraint instead of duplicating, so replays are safe by construction.

Keep reading

  • How-to

    Keep a PanelView Plus Trend Logging After Screen Changes

    A PanelView Plus Trend object only records while its screen is visible. Configure a Data Log model to start at power-up, show it through an XY trend with pen 2 as the X axis, and give the log a bounded record limit so it overwrites the oldest records instead of growing without bound.

    HMI and touchscreens

  • Troubleshooting

    Why HMI Data Logs Export Bool True as -1

    A Comfort Panel USB data log shows -1 for a true Boolean because the export serializes the all-ones bit pattern as a signed value. Assign the literals 1 and 0 conditionally into a separate numeric tag and log that tag; a direct copy into an Int or UInt keeps the -1. Verify the change in the raw CSV with a text editor.

    HMI and touchscreens

  • Troubleshooting

    Why WinCC 7.5 Runtime Fails Under a New Windows User

    Runtime failing under a newly created Windows account while Explorer opens is a Windows security-context problem, not a WinCC project problem. Put the account in the SIMATIC HMI group, sign out fully, verify effective access to the project, and after an Admin password change update the logon identities of services and scheduled tasks.

    HMI and touchscreens