Resolving WinCC API Error 4029 (PutSingleMessageProperties) During OS Compilation
WinCC API Error 4029 ('Message was not created: PutSingleMessageProperties... Ret=-1 Err1=0x80004005') during AS-OS compilation in SIMATIC PCS 7 V8.1 SP1 indicates a database failure when writing message records into the WinCC Alarm Logging SQL tables. The error code 0x80004005 (E_FAIL) points to corrupted Alarm Logging indexes, locked SQL database tables, duplicate message number collisions, or a known message compiler bug present in WinCC V7.3 Upd4. To resolve this, execute CCResetProject.exe to clear locks, rebuild the message database using an 'Entire OS with memory reset' compile, and install WinCC V7.3 SE Upd5 or higher.
Table of Contents
- AS-OS Message Compilation Mechanism and the WinCC API
- Root Cause Analysis - Database Locks and Error 0x80004005
- Diagnostic Matrix for WinCC API and Message Compilation Errors
- Step-by-Step Resolution and Database Recovery Procedure
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
AS-OS Message Compilation Mechanism and the WinCC API
During AS-OS engineering compilation in SIMATIC PCS 7, the compilation engine synchronizes alarm configurations defined in CFC chart blocks (such as ALARM_8P instances within APL blocks MotL, VlvL, and MonAnL) into the WinCC Alarm Logging subsystem. The compiler communicates with the WinCC SQL database using internal ODK API calls, specifically PutSingleMessageProperties.
Each message contains attributes such as Message Number, Message Class, Message Type, Event Text, and process value archive assignments. If the database engine encounters an unhandled exception while inserting or updating a message record, the API aborts the transaction and logs Error number: 4029 alongside COM HRESULT error 0x80004005 (Unspecified Error).
Root Cause Analysis - Database Locks and Error 0x80004005
Three technical conditions typically trigger WinCC API Error 4029 during compilation:
1. Software Defect in WinCC V7.3 Upd4: In PCS 7 V8.1 SP1 systems running WinCC V7.3 Upd4, a specific defect in the Alarm Logging compilation binary causes memory leaks and index corruption when compiling projects with large message counts. Siemens resolved this issue in WinCC V7.3 SE Upd5 and PCS 7 V8.1 SP1 Update Collection 2 (UC2).
2. Orphaned SQL Server Locks or Background Services: If WinCC Runtime was improperly terminated, or background processes (CCConfigStudio.exe, CCDataServer.exe) retained open locks on the project database file (*RT.mdf), SQL Server blocks write transactions.
3. Duplicate Message Number Assignment: If blocks were copied across projects or manually assigned duplicate message numbers in STEP 7, the unique constraint index on the message table is violated.
Diagnostic Matrix for WinCC API and Message Compilation Errors
The table below details error codes, diagnostic logs, and root cause classifications for AS-OS compilation faults:
PutSingleMessageProperties: PutCollectID... Ret=-10x80004005E_FAIL (Unspecified failure)CCResetProject.exe and check SQL disk space.Message number already exists in databaseALARM_8P block message IDs.Options -> Assign Message Numbers in STEP 7.Transfer.log<Project_Folder>\GlobalStep-by-Step Resolution and Database Recovery Procedure
- Terminate WinCC and Reset Locks:
- Close SIMATIC Manager and all WinCC Explorer windows.
- Open the command prompt as Administrator and execute:"C:\Program Files (x86)\Siemens\WinCC\bin\CCResetProject.exe".
- Wait for the reset utility to release all open database handles and terminate lingering WinCC background processes. - Check for Duplicate Message Numbers in STEP 7:
- In SIMATIC Manager, select the AS project object -> selectOptions -> Assign Message Numbers....
- Verify that all blocks possess unique, globally valid message numbers. - Apply Software Updates: Verify WinCC version in WinCC Explorer (
Help -> About). If running WinCC V7.3 Upd4, install WinCC V7.3 Upd5 (or latest Update Collection for PCS 7 V8.1 SP1). - Recompile OS with Memory Reset:
- In SIMATIC Manager, right-click the OS Server object and selectCompile.
- In the compilation wizard, select Entire OS and explicitly check With memory reset.
- Run compilation: the compiler completely purges obsolete message tables and regenerates all message indexes cleanly. - Verify Compilation Log: Open the compilation log: confirm zero errors and successful completion of the message transfer phase.
Verification
Verify resolution through the following milestones:
1. Confirm that the AS-OS compilation finishes with status 0 Errors, 0 Warnings (or benign informational notices).
2. Open WinCC Explorer on the OS Server, launch Alarm Logging, and verify that the message list displays all process messages with correct block names, message classes, and event texts.
3. Start WinCC Runtime and trigger a test alarm: verify immediate display in the Alarm Control without database write errors.
Limitations and Operational Precautions
Never execute CCResetProject.exe while WinCC Runtime is active on a live production station, as it forcibly drops database connections and terminates communication channels. Always perform database resets during scheduled maintenance windows or on engineering stations. Furthermore, never attempt to manually delete SQL tables or edit schema files inside the WinCC SQL instance directly.
Engineer FAQ
Technical References
- SIMATIC PCS 7 Operator Station Engineering and Maintenance Manual
- SIMATIC WinCC V7.3 System Manual - Working with WinCC
- Siemens Technical Support: Resolving WinCC API Error 4029 and OS Compilation Faults (SIOS Entry ID 109748935)
Related Articles
- Troubleshooting WinCC Audible Alarm and Horn Configuration in PCS 7 V8.x and V9.0
- Resolving WinCC Auto-Diagnosis Alarm OS Handles Count Exceeded HIGH Alert Threshold
- Attaching Detached WinCC Tag Logging MDF Archive Segments and ValueID Reconciliation
Related Tags
- Error 4029
- OS Compilation
- Alarm Logging
- PutSingleMessageProperties
- WinCC V7.3
- CCResetProject