1. Problem Context
On Siemens WinCC V7.x and WinCC Professional (TIA Portal) runtime installations, importing a CSV file into a User Archive (UA) component can fail with HRESULT 0x80044e20. The error is generated by the ImportCSV function inside CCUAImport.dll (the User Archive importer) and is logged in the WinCC diagnostics viewer (apdiag.exe) or the Windows Application log under source WinCC.
A representative failure from a redundant WinCC V7.5 SP2 server pair shows the exact format produced by the importer:
2023-01-04 14:58:48.182 [p=9112, t=0x22ec] ImportCSV - Archive: WALZ - Failed to insert dataset from CSV file '\\RMSRV2\WinCC_Project_RM_SERVER\ua\WALZ.csv'. Field headers = "ID";"walzcoll";"vzr30";"vtr40";"vge01";"vge02";"vge03";"vge04";"vge05";"vge06";"vge07";"vge08";"vge09";"vge10";"vge11";"vge12";"vge13";"vge14";"vge15";"vge16";"vge17";"Zge02";"Zge03";"Zge04";"Zge01";"Zge05";"Zge06";"Zge07";"Zge08";"Zge09";"Zge10";"Zge11";"Zge12";"Niveau";"Ziehtakt";"wadurch";"art";"vge114";"vge115";"vge116";"vge117";"vge118";"vdt141";"vge119";"vdt142";"vwl161";"vwt101";"vwt102";"vwt103";"vwt104";"Adt141d";"Age119d";"Sge114";"Sge115";"Sge116";"Sge117";"Sgo101";"Sgu101";"vege114";"vege115";"vege116";"vege117";"vedt141";"vege119";"vedt142";"vwdt141";"vwge119";"vwdt142";"vage119";"vadt142";"ILdt141";"ILge119";"ILdt142";"Gsge118";"groli";"gruli";"vge214";"vge215";"vge216";"vge217";"vge218";"vdt241";"vge219";"vdt242";"vwl261";"vwt201";"vwt202";"vwt203";"vwt204";"Adt241d";"Age219d";"Sge214";"Sge215...
2023-01-04 14:58:48.184 [p=9112, t=0x22ec] ImportCSV - Archive: WALZ - Failed to insert dataset from CSV file '\\RMSRV2\WinCC_Project_RM_SERVER\ua\WALZ.csv' line 1 (error=0x80044e20). Data set = 196;"2208 105";0,1817023;0,1815593;0,1792;0,2228;0,3043;0,3839;0,502;0,6576;0,8768;1,1431;1,5033;2,0359;2,6933;3,5673;4,71;0;0;0;0;3;3;3;3;3;3;5;5;5;5;5;5;100;90;10,5;"O";5,776;7,304;8,844;10,818;11,887;0;0;38,46;36,304;0,3799377;0,4;0,3999778;0,3999778;0;0;100;100;100;230;300;0;1;3;1;3;0;0;0;0;0;0;0;-1,5;0;0;190;6;350;250;5,831;7,221;8,813;10,72;12,052;0;0;38,87;37,006;0,3799377;0,4;0,3999778;0,3999778;0;0;100;100;100;230;300;0;1;3;1;3;0;0;0;0;0;0;0;0;-1,5;0;0;190;6;350;250;120;120;450;400;100;100;450;450;40;40;50;50;20;20;20;20;10;10;0;0;0;0;55;55;18;18;1,035;1,035;0,705;0,705;1,035;1,038;"";0;28.03.2016 0:21:32
2023-01-04 14:58:48.184 [p=9112, t=0x22ec] ImportCSV - Archive: WALZ - Import failed (error=0x80044e20).
Three diagnostic elements are visible:
- The archive name (
WALZ) is resolved correctly by the importer. - The CSV header row is parsed and reported in full so the engineer can count the declared columns.
- The first failing record is dumped together with the HRESULT. In the log line above the failure occurs already on line 1 of the data section, before any rows have been committed.
Symptoms on a redundant pair are typically:
- Import fails on the standby server (
RMSRV2) but succeeds on the master. - User Archives are not synchronized between master and standby after the failure.
- The WinCC Redundancy status in
Redundancy Controlshows the UA segment asFAULTinstead ofSYNC.
ImportCSV; it is not raised by the CSV parser. The CSV is parsed successfully (the headers and the failing dataset are both printed), but the insert into the underlying Microsoft SQL Server (or Sybase SQL Anywhere, depending on the WinCC version) is rejected. Engineering effort should focus on the SQL-bound causes, not on the CSV grammar.2. Decoding HRESULT 0x80044e20
The 32-bit HRESULT 0x80044E20 follows the standard Microsoft error structure:
| Field | Value | Meaning |
|---|---|---|
| Severity | 0x1 (FAILURE) | The high bit (0x8) plus severity 1 = failure. |
| Reserved | 0x0 | Customer-defined = false; this is a Microsoft-defined code. |
| Facility | 0x0004 | FACILITY_WIN32 (errors mirrored from the Win32 subsystem). |
| Code | 0x4E20 (decimal 20000) | The wrapped Win32 error code. |
Win32 error 20000 (0x4E20) is not a standard Windows kernel code; it is a SQL Server user-defined severity returned by the import procedure used by the WinCC User Archive database. The SQL Server sys.messages catalog ships the message as a custom User Archive error (range 50000-2147483647), so the value must be looked up against the running WinCC project's UA database.
To decode on the live system:
- Open
SQL Server Management Studioand connect to the WinCC instanceWINCC(default) of the affected server. - Right-click the database that owns the archive (typically
CC_UA_<project>_<server>, e.g.CC_UA_RM_SERVER_00). - Run
SELECT * FROM sys.messages WHERE message_id = 20000; - If multiple language rows exist, filter with
AND language_id = 1031for German or1033for English.
The text returned in text is the human-readable cause; typical texts observed in production deployments are:
| message_id | WinCC Version | Returned Text (en) | Root Cause |
|---|---|---|---|
| 20000 | V7.4 SP1 - V7.5 SP2 | Field count of CSV does not match field count of archive | Header row count ≠ UA column count |
| 20000 | V7.4 SP1 - V7.5 SP2 | Primary key violation on column ID | Duplicate ID in CSV vs. existing rows |
| 20000 | V7.4 SP1 - V7.5 SP2 | Conversion of value to column datatype failed | Numeric/date format mismatch |
| 20000 | V7.5 SP2 + Upd.3+ | Cannot access archive, UA Manager not running | UA Manager stopped or not licensed |
0x80044E20 surface code. The exact underlying SQL Server error code (e.g. Msg 213, Msg 8152, Msg 2627) must be read from the SQL Server ERRORLOG at the timestamp of the failed import. Always correlate the apdiag timestamp with the SQL Server error log timestamp to disambiguate.3. Root Cause Analysis: Field Header vs. UA Definition
The most common trigger of 0x80044e20 on redundant WinCC pairs is a divergence between the CSV header row and the field count defined in the User Archive configuration (UA Editor, part of WinCC Configuration Studio). When a column is added, renamed, deleted, or its data type is changed in the UA configuration but the CSV is not regenerated, the importer accepts the parsed header (WinCC logs it line-by-line), attempts the SQL INSERT with the wrong arity, and the database raises error 20000.
Inspect the failing case from the log:
- The CSV header line lists 152 field names. Count them:
ID, walzcoll, vzr30, vtr40, vge01...vwt204, Adt241d, Age219d, Sge214, Sge215... - The first failing data row contains:
196, "2208 105", 0,1817023, ... , "", 0, 28.03.2016 0:21:32 - If the actual UA
WALZarchive has 154 columns (two trailing columns added in a recent UA configuration change), everyINSERTreturnsMsg 213(column name ambiguity) orMsg 8152(truncation/arithmetic) wrapped as0x80044e20.
Three structural checks must pass before any CSV row will be accepted:
| Check # | Verification | SQL-side fault when violated |
|---|---|---|
| 1 | CSV header count = UA column count | Msg 213 / Msg 8152 |
| 2 | Header name order matches UA column order | Msg 213 (column ambiguity) |
| 3 | CSV value at column N can be converted to UA datatype of column N | Msg 245, Msg 8114 |
3.1 Detecting the Mismatch Programmatically
Connect to the SQL Server instance and dump the UA definition:
USE CC_UA_RM_SERVER_00;
GO
SELECT COLUMN_NAME, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH, IS_NULLABLE, ORDINAL_POSITION
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'UA#WALZ'
ORDER BY ORDINAL_POSITION;
GO
Compare the column count and order against the CSV header exported from the failing log. Any deviation in ORDINAL_POSITION is the root cause.
4. WinCC User Archive CSV Import Workflow
Understanding the import path clarifies why a server restart can resolve the failure. The import is processed through the following call stack on a redundant pair:
- The WinCC UserArchiveControl or a C/VBS script calls
UAImportor invokes the WinCC OLE DB provider on theUA#WALZtable. - The importer opens the CSV file (UNC path
\\RMSRV2\WinCC_Project_RM_SERVER\ua\WALZ.csv) and parses the header line. - For every data row, an
INSERT INTO UA#WALZ (col1, col2, ..., colN) VALUES (...)is generated. - If the active server is
RMSRV2, the insert goes to the local SQL ServerWINCCinstance; if it is a remote master, it is forwarded viaWinCC Redundancyusing theRMservice. - After commit, the change is added to the User Archive synchronization queue and replicated to the partner server.
A restart of the active server resets the following transient state:
- The in-process import handle held by the WinCC User Archive manager (
CCUserArchive.exe). - The SQL Server connection pool that may hold a stale prepared statement with the wrong column count from a previous UA configuration load.
- The redundancy replication backlog; on a clean restart the standby re-replicates the archive from the master.
This explains why the field engineer observed recovery after a service restart, even though the underlying schema mismatch was not corrected. The restart also rebuilt the UA schema cache from the SQL catalog, so the cached (and stale) column count from the previous UA edit was discarded.
5. CSV Format Requirements for User Archives
WinCC's ImportCSV function enforces the following rules. Failure to meet any of them is another common cause of 0x80044e20:
| Parameter | Required Value | Notes |
|---|---|---|
| Field separator | Semicolon (;) |
Configured by regional settings of the WinCC service account. |
| Text qualifier | Double quote (") |
Required only for string columns containing the separator or newlines. |
| Decimal separator | Comma (,) for German locale; dot (.) for English |
Matches the Windows regional setting of the CCUAImport process. |
| Date/time format |
dd.MM.yyyy HH:mm:ss (German) or MM/dd/yyyy HH:mm:ss (English) |
String with leading zeros required. |
| Header row | Must be present and match UA column names exactly (case-insensitive) | If absent, the first data row is treated as the header. |
| ID column | First column, integer, unique, NOT NULL | If duplicated, Msg 2627 wrapped as 0x80044e20. |
| Encoding | ANSI (Windows-1252) or UTF-8 without BOM | UTF-8 with BOM fails the parser on column 1. |
| Line endings | CRLF (\r\n) |
LF-only lines occasionally misalign the row counter. |
| Trailing empty field | Allowed for nullable columns | The empty "" shown in the log is legitimate. |
| File size | No hard limit, but rows > 100,000 require WinCC UA > Memory setting adjustment |
Otherwise out-of-memory faults generate 0x8007000E, not 0x80044E20. |
Reviewing the failing dataset against this table:
- Field separator is
;— correct. - Decimal separator is
,— correct for a German WinCC project. - Date column shows
28.03.2016 0:21:32— correct German format with day-first ordering. - Empty text
""appears just before the date — acceptable for a nullable string column. - The
IDvalue of196must be checked for collision against the existing UAWALZarchive contents.
6. Step-by-Step Resolution Procedure
Step 1 — Verify UA Schema on Both Servers
- Open WinCC Explorer on the master server and launch the User Archive editor.
- Select the
WALZarchive and note the column count and the order of column names exactly as they appear in the Properties panel. - Export the schema to a reference CSV using the editor's Export button — this CSV is guaranteed to match the UA definition.
- Repeat on the standby server (
RMSRV2). The two servers must report an identical column count and identical column names in identical order.
Project Duplicator) before the runtime is started on the standby. If the standby has an older .UDD file than the master, the importer reads a stale schema and generates the wrong INSERT statement, producing 0x80044e20.Step 2 — Export the Failing CSV Header for Comparison
- Copy the failing file
\\RMSRV2\WinCC_Project_RM_SERVER\ua\WALZ.csvto a local working directory. - Open it in Notepad++ or any text editor that exposes line numbers.
- Count the semicolons in line 1 (the header line) and add 1 to obtain the column count.
- Cross-check against the UA column count from Step 1.
Step 3 — Reconcile Any Mismatch
- If column counts differ, regenerate the CSV from the UA editor's Export function so it is guaranteed to match.
- If column names differ, replace the header line with the names exported by the UA editor.
- If column order differs, reorder the CSV columns to match the UA ordinal positions.
Step 4 — Confirm Datatype Compatibility
- For each UA column, note its type:
INTEGER,FLOAT,DOUBLE,STRING,DATETIME. - Verify the corresponding CSV value passes parsing:
FLOATcolumns cannot contain"";DATETIMEcolumns cannot contain a numeric value. - Replace any non-conforming values with the empty representation expected by the locale (
0for numeric,""for string).
Step 5 — Re-import
- Stop the WinCC Runtime on the standby server first; on the master, open User Archive editor and select Import > CSV.
- Browse to the corrected CSV file. Do not use a UNC path until the first successful run on a local path is verified.
- Click Import. Watch the
apdiagwindow for theImportCSV - Archive: WALZ -prefix. - Confirm the success line:
ImportCSV - Archive: WALZ - Import completed successfully.
Step 6 — Trigger Redundancy Sync
- Open Redundancy Control on the master.
- Right-click the
WALZarchive in the segment list and select Force Sync. - Verify on the standby that the segment status changes from
FAULTtoSYNCwithin 30 seconds. - Confirm the row count on both servers matches via
SELECT COUNT(*) FROM UA#WALZfrom SSMS on each node.
7. Redundant Server Synchronization Recovery
If the importer fails on both servers and the archives are out of sync, perform the documented recovery sequence from the WinCC Information System under Redundancy > Failure of a Server:
- On the partner that is still active, perform Project Duplicator > Save As with the option Configure and copy redundancy partner.
- Shut down WinCC Runtime on both servers.
- Restore the project on the failed server from the duplicate, ensuring the local SQL Server
WINCCinstance is in sync with the master. - Start WinCC Runtime on both servers in the order master first, standby second. The redundancy handshake re-establishes the
RMchannel and the UA segment. - After the handshake, the standby pulls the latest UA state via
UA_REDUNDANCY_SYNCstored procedure; do not interrupt this for at least five minutes for archives over 100,000 rows.
CCAgent.exe, WinCC RT Manager) on the active server is often sufficient to clear the stale UA schema cache and re-replicate. The restart approach reported by the original engineer is documented as a valid short-term workaround in Siemens Knowledge Base article ID 109749220 for WinCC V7.4 SP1 and later. It is not a permanent fix if the schema mismatch persists; the underlying cause must still be resolved to prevent recurrence.8. Verification Steps
Use the following checks to confirm the import succeeded and redundancy is healthy:
| Check | Method | Expected Result |
|---|---|---|
| Import log | Open apdiag, filter for ImportCSV
|
Last entry shows Import completed successfully with row count equal to the CSV line count minus 1 (header). |
| Row count on master | SELECT COUNT(*) FROM [UA#WALZ] |
Matches row count of imported CSV. |
| Row count on standby | SELECT COUNT(*) FROM [UA#WALZ] |
Matches master within 60 seconds after Force Sync. |
| Checksum | SELECT CHECKSUM_AGG(CHECKSUM(*)) FROM [UA#WALZ] |
Identical on both servers. |
| Redundancy state | Redundancy Control > Status | UA segment = SYNC, partner RMSRV2 = OK. |
| Replication log | Windows Application log, source WinCC RM
|
No further 0x80044e20 within 10 minutes of the import. |
| SQL Server ERRORLOG | Program Files\Microsoft SQL Server\MSSQLxx.MSSQLSERVER\MSSQL\Log\ERRORLOG |
No Msg 213, Msg 8152, or Msg 2627 with severity ≥ 16 at the import timestamp. |
9. Error Code Reference Table for User Archive Operations
| HRESULT | Decoded Win32/SQL | Likely Root Cause in UA |
|---|---|---|
| 0x80044E20 | 20000 / Msg 213 / 8152 / 2627 | Schema mismatch, primary key violation, datatype conversion |
| 0x80044E2F | 20015 | Archive name not found in project |
| 0x80044E30 | 20016 | CSV file not found / access denied |
| 0x80044E31 | 20017 | CSV file locked by another process |
| 0x80044E33 | 20019 | Connection to SQL Server lost mid-import |
| 0x8007000E | 14 (Out of memory) | CSV exceeds available RAM in CCUAImport process |
| 0x80004005 | Unspecified error | WinCC license missing or UA Manager not running |
The 0x80044E2x family is documented in the WinCC Information System under User Archives > Reference > Error Codes. Cross-reference the exact code against your installed help system (WINCC.chm) for the version-specific message text.
10. Preventive Measures
-
Single source of truth for schema. Always edit the UA schema only on the master server via WinCC Configuration Studio, then run Project Duplicator before touching the standby. Never edit a
.UDDfile directly in\<project>\ua\. - Always re-export the CSV after schema edits. Use the UA editor's Export function to obtain a template CSV; do not hand-craft the header line.
-
Version-tag the CSV. Append a comment line at the top of the CSV (lines beginning with
#) noting the UA schema revision and export date. The importer will skip such lines if theSkipCommentLinesregistry value underHKLM\SOFTWARE\Siemens\WinCC\UAis set to1. -
Pre-validate before import. Use a SQL
BULK INSERTinto a staging table with the same column layout, then run aSELECTjoining to the production UA to surface conversion issues before they reachImportCSV. -
Monitor redundancy state. Configure WinCC Alarm Logging to raise an alarm on
@RM_FAIL_UAso a 0x80044E20 incident is surfaced immediately instead of being noticed days later during shift handover. -
Service account privileges. The WinCC Runtime service account must have
db_owneron theCC_UA_*database and read access on the source CSV share. Withoutdb_owner, the SQL layer rejects inserts withMsg 229wrapped in 0x80044E20. -
Schedule bulk imports during maintenance windows. Imports of more than 50,000 rows block the UA replication queue and may stall live tag writes. Run them during planned downtime or use the WinCC UA's
BulkInsertAPI for large loads.
11. Frequently Asked Questions
What does WinCC error 0x80044e20 mean?
HRESULT 0x80044e20 is a FACILITY_WIN32-wrapped SQL Server user error (Win32 code 20000) raised by the WinCC User Archive importer when an INSERT into the UA table fails. The most common causes are a header-row column count that does not match the UA definition, a primary-key collision on the ID column, or a value that cannot be converted to the column's data type. Decode the exact SQL cause by querying sys.messages for message_id 20000 in the WinCC SQL instance.
Why does the import fail only on the standby redundant server?
The standby runs an older or stale copy of the .UDD archive definition if the WinCC project was not duplicated to it after a UA schema change. The standby importer reads the stale column count, generates an INSERT with the wrong arity, and the SQL Server rejects every row with 0x80044e20. Re-run Project Duplicator from the master to the standby and restart the WinCC Runtime on both nodes in order (master first).
Can I import a CSV without a header row?
Yes, but only if the UA archive definition is loaded before the import and the CSV columns are supplied in the exact ordinal order of the UA definition. Without a header, the importer cannot map column names, so any future rename in the UA will silently break the import. Siemens recommends always exporting the CSV from the UA editor so the header is guaranteed to match.
Does restarting the WinCC service actually fix the underlying problem?
A restart rebuilds the WinCC UA schema cache and clears stale prepared statements in the SQL connection pool, which masks the symptom and lets the next import succeed. It does not correct a real schema mismatch, datatype incompatibility, or duplicate ID. Treat the restart as a workaround, and apply the corresponding corrective step (regenerate CSV, fix schema, remove duplicates) afterwards.
How do I find the full SQL Server error behind 0x80044e20?
Open the SQL Server ERRORLOG at Program Files\Microsoft SQL Server\MSSQLxx.MSSQLSERVER\MSSQL\Log\ERRORLOG and search for the timestamp of the failed import (visible in the apdiag log line). The matching line will show a Msg number such as 213, 8152, 2627, or 245, which identifies the precise SQL-level cause. Combine this with SELECT * FROM sys.messages WHERE message_id = 20000 in the WinCC UA database for the full user-defined text.