Resolving WinCC 6.2 User Archive Runtime Errors and Job Tag Failures
Siemens WinCC V6.2 ships with the User Archive option as part of the runtime database layer. The archive stores user-defined records (recipes, batch logs, alarm annotations, equipment IDs, validation tables) and exposes them to the runtime via the UserArchiveControl ActiveX control and four mandatory control tags: JOB, ID, FIELD, VALUE. When one or more of these tags is missing, mis-wired, or the underlying Jet/MDB project database is corrupted, the runtime either returns the placeholder error code -1 in the JOB tag, refuses to open the "Runtime data" view inside the User Archive Editor, or raises a generic project manager exception at start-up.
This reference collects every documented failure mode that has been reported against WinCC V6.2 SP3 / V6.2 SP4, the diagnostic workflow Siemens support engineers recommend, and the verified field procedure that recovers the archive without rebuilding the entire SCADA project.
1. Problem Overview
Three reproducible symptoms appear when the User Archive configuration is broken:
- Editor warning ("error 1"). Opening User Archive Editor > Run time data raises a WinCC project manager warning. The editor cannot enumerate the active archive because the linked MDB file is unreadable, the archive has been deleted from disk but the project still references it, or the ODBC data source name (DSN) for the User Archive runtime database is missing.
-
Runtime exception ("error 2 / error 3"). The runtime process
PDLRT.exestops processing UserArchiveControl tag updates and logs a project manager error. This is the most common symptom of a damaged project database (corrupt*.UDM,*.LDB, or the centralWinCC_proj.mdb). -
JOB tag returns
-1. After invoking a control operation through I/O fields (for example, JOB = 7 with ID = 0 to select a data record by ID), the JOB tag is immediately overwritten by-1, indicating that the UserArchiveControl could not match the requested ID or that no record was selected.
The combination of all three is the classic fingerprint of a damaged User Archive and an incomplete tag wiring.
2. Root Cause Analysis
Each symptom maps to a discrete root cause. Treat them as a checklist; fix the first cause before continuing.
| Symptom | Likely Root Cause | Diagnostic File / Counter |
|---|---|---|
| Editor "Runtime data" warning | Project database inconsistency: archive deleted from \ but still listed in Project Properties > User Archive; or ODBC DSN CC_UA_<project>_<server> missing |
CCUASvr.log, SQLDiag.txt in \<project>\Diagnostics\
|
| Runtime exception at start-up | Damaged Jet MDB or LDB lock file; archive selected as Start-up archive but fails to load | Windows Event Viewer » Application » PDLRT.exe error |
JOB tag returns -1
|
Missing JOB tag wiring on the UserArchiveControl; ID field does not exist; requested ID does not match any record |
Live tag list in WinCC Explorer » JOB, UA_ID, UA_FIELD, UA_VALUE
|
| View cannot be edited | View created but linked to underlying archive that has been renamed or deleted | User Archive Editor » Views tab |
2.1 Where the User Archive Stores Its Data
The User Archive runtime database lives under the active WinCC project path. By default this is:
C:\Siemens\WinCC\WinCCProjects\<ProjectName>\Database\UserArchive\
C:\Siemens\WinCC\WinCCProjects\<ProjectName>\Database\UserArchive\<ArchiveName>.udm
C:\Siemens\WinCC\WinCCProjects\<ProjectName>\Database\UserArchive\<ArchiveName>.ldb
The .udm file is a Jet/Access MDB; the .ldb is its lock file. If the runtime is not stopped cleanly the .ldb remains and the project manager refuses to reopen the archive.
3. Required Control Tag Configuration
The UserArchiveControl ActiveX cannot read or write records unless its four internal interface tags exist in the WinCC tag database. The tags must be created with the exact data types listed below; do not substitute BYTE for WORD or you will see overflow on JOB code writes.
| Tag | Data Type | Direction | Purpose |
|---|---|---|---|
UA_JOB |
Unsigned 16-bit Word | WinCC → Control (write) / Control → WinCC (return code) | Command code (read, insert, delete, write, select-by-ID) |
UA_ID |
Signed 32-bit Double Word | Bidirectional | Database primary key / record handle |
UA_FIELD |
Text tag, 1–255 characters | Bidirectional | Column name of the field to be accessed |
UA_VALUE |
Text tag, 1–255 characters | Bidirectional | String representation of the value to be read or written |
If any of these tags is missing the runtime falls back to a sentinel return value of -1 in the JOB tag regardless of which JOB code you write. This is the behaviour observed when the engineer used only FIELD and VALUE tags and omitted JOB.
3.1 Wiring the Tags to I/O Fields
Drag a UserArchiveControl onto the picture, open Configuration > Connect, and bind:
JOB <--> Tag UA_JOB (Word)
ID <--> Tag UA_ID (DWord)
Field <--> Tag UA_FIELD (Text tag, length 32)
Value <--> Tag UA_VALUE (Text tag, length 64)
Place four I/O fields on the same picture and link them to the same four tags. Setting UA_JOB = 7 and UA_ID = 0 with UA_FIELD = "RecipeNo" triggers a Select by ID; the runtime overwrites UA_JOB with 0 on success, with -1 on failure.
4. Job Tag Value Reference
The WinCC Information System lists the JOB code values implemented by the UserArchiveControl for V6.2. The codes below are taken from the official WinCC V6.2 help under Options > User Archive > Configuration > Job Tag.
| JOB Code | Operation | Pre-conditions | Result on UA_JOB |
|---|---|---|---|
| 0 | Read first data record | Archive open | 0 on success, −1 on failure |
| 1 | Read next data record | Current record loaded | 0 / −1 |
| 2 | Read previous data record | Current record loaded | 0 / −1 |
| 3 | Read last data record | Archive open | 0 / −1 |
| 4 | Insert new data record | Field tags fully populated | New ID on success, −1 on failure |
| 5 | Delete current data record | Current record loaded | 0 / −1 |
| 6 | Write / update current data record | Current record loaded, fields modified | 0 / −1 |
| 7 | Select by ID | UA_ID contains a valid primary key | 0 on success, −1 if ID not found |
| 8 | Read field names into UA_FIELD | Archive open | 0 / −1 |
| 9 | Clear all filter criteria | None | 0 / −1 |
| 10 | Read archive configuration | Archive open | 0 / −1 |
The return value -1 is intentionally reused for every failure mode. To disambiguate it you must inspect the CCUASvr.log diagnostic file written into the project diagnostics directory.
5. Database Recovery Procedure
When the Editor warning ("error 1") and the runtime exception ("error 2/3") appear together, the project database is the prime suspect. The recovery workflow below preserves the archive content while repairing the project metadata.
5.1 Pre-conditions
- WinCC runtime must be deactivated on the affected server.
- The WinCC Project must not be opened in any other WinCC Explorer session (lock file conflict).
- Take a file-system backup of
\<project>\before touching the database directory.
5.2 Step-by-Step
-
Stop WinCC Runtime via WinCC Explorer > Computer > Stop Runtime. Verify
PDLRT.exehas terminated in Task Manager. -
Delete the
.ldblock file inDatabase\UserArchive\for the affected archive. The lock file is auto-generated when the runtime opens the archive; an orphaned.ldbalways indicates an unclean exit. -
Verify the ODBC DSN. Open Start > Administrative Tools > Data Sources (ODBC) > System DSN. Confirm the DSN named
CC_UA_<ProjectName>_<ServerName>exists and points at the.udmfile with Microsoft Access Driver (*.mdb). -
Compact the
.udmfile. Open it in Microsoft Access (Office 2003 / 2007 is the supported Jet version for WinCC V6.2) and run Tools > Database Utilities > Compact and Repair Database. This rebuilds the index and frees unused pages. - Re-link the archive. In User Archive Editor, right-click the archive » Properties > Path; verify the path matches the compacted file.
- Re-activate Runtime and confirm the "Runtime data" view opens cleanly.
5.3 Field-Proven Workflow for Persistent Corruption
If the Editor still warns after compaction, the archive definition is broken even if the file is intact. Apply the rebuild workflow:
- In User Archive Editor, create a new archive with a temporary name (e.g.
Archive_New). Recreate every column with the same data types and field names as the original. - Open both archives in the runtime and use a WinCC Global Script action to copy each record from the old archive to the new archive (read with JOB=0..3, write with JOB=4).
- Delete the old archive file and remove it from the project tree.
- Rename
Archive_Newto the original archive name so any script or HMI reference that points at the original name still resolves. - Restart runtime.
6. View Configuration
A View in the User Archive sense is not a SQL view; it is a filtered, ordered projection exposed to a UserArchiveControl for display in a WinCC Picture Window. The View can hide columns, apply a WHERE filter, and define a sort order. A view is not mandatory if the picture only needs to enumerate the full archive through the standard table control; it becomes mandatory when you want to filter or reorder columns without writing a script.
6.1 Creating a View
- Open User Archive Editor > Views tab.
- Right-click » New View.
- Bind the view to an archive, name it (e.g.
RecipeView), and select the columns to expose. - Define the sort order and any filter on column values.
- Save the view. It is stored inside the project database, not as a separate file.
6.2 Common View Errors
- View opens but is read-only. The view filter references a column that has been deleted from the underlying archive. Recreate the column or relax the filter.
- View does not appear in the runtime control. The view is named but the UserArchiveControl in the picture is bound to the archive directly, not to the view. Re-bind the control's View property.
7. Runtime Configuration
The archive must be opened for runtime; otherwise every JOB write will return -1 with no log entry. Open Computer > Properties > Startup in the WinCC Explorer and add the archive to the User Archive start-up list. The archive is then loaded automatically when the runtime starts.
For redundancy configurations (WinCC Redundancy option), the start-up list must be identical on both servers. A mismatch causes the standby server to fail opening the archive on failover, producing the same -1 return code on its JOB tags.
8. Verification Procedure
After applying the recovery workflow, run the following verification sequence in the runtime. Each step has a pass criterion you can record in the SAT (Site Acceptance Test) report.
-
Open the runtime picture. The four I/O fields display the current values of
UA_JOB,UA_ID,UA_FIELD,UA_VALUEwithout warning icons. Pass: no warning. -
Write JOB = 0. The first record loads;
UA_FIELDshows a column name andUA_VALUEshows the corresponding value. Pass:UA_JOBreturns to0within 200 ms. -
Write JOB = 1 three times. The next three records load in order. Pass:
UA_JOBreturns0after each write. -
Write JOB = 4. A new record is inserted;
UA_IDreturns the new primary key. Pass: new ID > previous max ID. -
Write JOB = 7 with the new ID. The just-inserted record is selected. Pass:
UA_JOBreturns0, not-1. -
Write JOB = 6. The current record is updated. Pass:
UA_JOBreturns0; changes are visible in the Editor. - Stop runtime and restart. No "Runtime data" warning in the Editor. Pass: warning absent.
9. Diagnostic Logging
WinCC V6.2 writes the User Archive diagnostics to a file named CCUASvr.log in \<project>\Diagnostics\. Increase the log verbosity via Computer > Properties > User Archive > Trace. The trace levels are:
| Trace Level | Output | Use Case |
|---|---|---|
| 0 | No trace | Production |
| 1 | Errors only | Default; troubleshooting |
| 2 | Warnings + errors | Commissioning |
| 3 | Info + warnings + errors | Development |
| 4 | Verbose (every JOB call) | Performance analysis only |
Set trace level to 3 when troubleshooting JOB returns -1; the trace prints the actual ODBC error code (for example ODBC error 3010: table not found) immediately after the failure event.
10. Flow Diagram: From Fault to Recovery
11. Migrating to WinCC V7.x
If you are planning to upgrade a V6.2 installation to V7.0 or later, take a project backup, perform the upgrade through the WinCC Project Migrator, and then run Project > Migrate User Archive. The migration preserves every .udm file but rebuilds the project metadata in the new SQL Server–backed runtime database. The JOB code semantics (0–10) are unchanged; only the ODBC driver switches from Jet to SQL Native Client.
If you skip the Migrate User Archive step, the runtime will continue to find the .udm files in the project tree but will fail to map the UserArchiveControl's tag references, which produces the same -1 return code reported in V6.2.
12. Practical Tips from the Field
- Always include the
JOBtag in the picture's I/O field set; it is the only tag that returns a verification code. - If you read a record using
JOB = 0andUA_FIELDis empty afterwards, the archive opened but has no rows — insert at least one row withJOB = 4. - The runtime never deletes the
.ldbfile on a normal stop; an orphaned.ldbis therefore diagnostic of a crash. Run Microsoft Access Compact and Repair on every.udmafter such a crash before re-activating the runtime. - Avoid mixing WinCC V6.2 archive editors between SP levels. The SP3 and SP4 UserArchiveControl share the same JOB semantics but the SP4 build adds an internal version stamp that the SP3 editor cannot read. Stick to one SP level across the engineering team.
- If the runtime is on a 64-bit Windows host, register the 32-bit ODBC administrator explicitly (
%systemroot%\SysWOW64\odbcad32.exe) to manage the User Archive DSN. The default 64-bit ODBC admin will not show the Jet-based DSNs that V6.2 requires.
FAQ
Why does the JOB tag immediately return -1 after writing a value?
Because the UserArchiveControl could not resolve the request. The most common reason is a missing JOB tag wiring — only FIELD and VALUE were configured. Create the four mandatory tags (UA_JOB word, UA_ID DWord, UA_FIELD text, UA_VALUE text), bind them to I/O fields, and re-trigger the operation.
What does JOB code 7 do in WinCC 6.2 User Archive?
JOB = 7 performs a "Select by ID" using the value currently held in UA_ID. On success the JOB tag returns 0 and the matching record's columns become readable via the FIELD/VALUE tags. On failure (no record matches the ID) the JOB tag returns -1.
How many fields can a single User Archive contain?
The WinCC V6.2 Information System caps the archive at 500 fields and 8,192 bytes total record length. Crossing either limit causes the project manager to refuse opening the archive with a generic runtime exception.
Is a View required for the User Archive to work in runtime?
No. A View is only required when you need a filtered or reordered projection of the archive displayed in a UserArchiveControl. If you want the full archive enumerated in the table control, bind the control directly to the archive and skip the Views tab entirely.
How do I recover a corrupted .udm file without rebuilding the project?
Stop the runtime, delete the orphaned .ldb file, open the .udm in Microsoft Access (Jet-compatible version), run Compact and Repair Database, then re-activate the runtime. If the User Archive Editor still warns, create a parallel archive, copy records row by row through JOB 0..3 (read) and JOB 4 (insert), then delete the old archive.