Resolving WinCC OS Server Startup Hangs and Corrupted Alarm Logging Runtime Databases
When a SIMATIC PCS 7 OS Server hangs indefinitely during startup specifically when 'Alarm Logging Runtime' is enabled, the failure is caused by corrupted Microsoft SQL Server message archive tables or damaged circular archive segments (Alg.mdf/Alg.ldf). Standard project reorganization ('File > Reorganize') cannot repair damaged relational SQL message pages. To restore server startup: terminate WinCC processes, navigate to the project 'ArchiveManager' directory, quarantine existing message archive segment files, restart WinCC Explorer, re-save the Alarm Logging configuration, and allow the system to generate pristine message archive databases.
Table of Contents
- Executive Summary
- Architecture and Fundamental Mechanics
- Step-by-Step Implementation Procedure
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Executive Summary
High-availability supervisory control in SIMATIC PCS 7 (V8.0 through V9.1) relies on Microsoft SQL Server to manage millions of historical process alarms and system events. In redundant OS Server environments, an abrupt system event—such as a power failure, blue screen crash, or hard reset during a database write transaction—can introduce physical corruption into active Alarm Logging database pages. Subsequent attempts to activate WinCC Runtime hang indefinitely on the startup progress screen as the alarm logging daemon (CCAlgRtServer.exe) enters an infinite wait loop trying to attach damaged archive segments. This article details the database mechanics of alarm archiving and provides the definitive recovery procedure.
Architecture and Fundamental Mechanics
Database Mechanics of Alarm Logging Runtime and SQL Server Hangs:
- Architecture of the Alarm Logging Engine (
CCAlgRtServer.exe): - When WinCC Runtime activates, the Startup sequence executes components in configured order: Graphics Runtime, Tag Logging Runtime, Alarm Logging Runtime, and Redundancy.
-
During Alarm Logging initialization,
CCAlgRtServer.exeperforms three critical database tasks:- Attaches the configuration database (
<Project_Name>Alg.mdf) to read defined message classes, blocks, and event texts. - Scans the
ArchiveManager\AlarmLoggingdirectory to mount active and circular historical message segment pairs (*_ALG_*.mdfand*_ALG_*.ldf). - Interrogates the redundant partner server (via
CCRedServer.exe) to synchronize missing alarm sequence stamps.
- Attaches the configuration database (
-
The Root Cause of Startup Freezes:
- If an OS Server lost power while SQL Server was executing an active I/O write on an alarm archive segment, the database page header or checksum becomes corrupted.
-
When
CCAlgRtServer.exeinstructs SQL Server to attach the segment, SQL Server enters an internal recovery loop or deadlocks on the corrupt page. The process hangs with high CPU or zero I/O progress. -
Why Project Reorganization Fails to Fix Archive Hangs:
- In WinCC Explorer, the command File -> Reorganize defragments configuration tables within the primary
.mcpand.dcfproject database. - It strictly does not parse, defragment, or repair external SQL Server circular archive files residing inside the
ArchiveManagerfolder. Consequently, corrupt archive segments remain in place and trigger identical startup hangs.
Step-by-Step Implementation Procedure
Step-by-Step Procedure to Recover from Alarm Logging Startup Hangs:
- Terminate All WinCC Runtime and Background Processes:
- Open Windows Task Manager on the hanging OS Server.
- Terminate hanging processes:CCProjectMgr.exe,CCAlgRtServer.exe,PdlRuntimeHost.exe, andCCScriptRt.exe.
- Alternatively, execute the official Siemens cleanup script:C:\Program Files (x86)\Siemens\WinCC\bin\CCResetRT.exe(run as Administrator). - Quarantine Corrupted Alarm Archive Segments:
- Open Windows File Explorer and navigate to your WinCC project directory.
- Open folder:<Project_Folder>\ArchiveManager\AlarmLogging.
- Create a temporary folder on another drive or desktop:C:\Quarantine_Alarms\.
- Select all existing segment files in theAlarmLoggingfolder (*_ALG_*.mdfand*_ALG_*.ldf) and MOVE (cut and paste) them into the quarantine directory.
- Leave theAlarmLoggingdirectory empty. - Rebuild Alarm Logging Configuration:
- Open WinCC Explorer (do not activate Runtime).
- In the WinCC Explorer tree, double-click Alarm Logging.
- Make a minor non-critical change (e.g. modify and revert a message text comment), then click File -> Save.
- This forces WinCC to rewrite its internal message configuration tables cleanly. - Verify Redundancy Synchronization Configuration:
- In WinCC Explorer, double-click Redundancy.
- Temporarily uncheck Synchronization of Alarm Logging after partner recovery to isolate the startup from partner synchronization loops.
- Click OK. - Activate WinCC Runtime:
- Click the Activate button in WinCC Explorer.
- Verify that Alarm Logging Runtime initializes instantaneously, creates fresh message database segments, and enters Runtime smoothly.
- Once stable, re-enable Redundancy synchronization in Alarm Logging.
Verification
Verification Procedure:
1. Startup Completion Check: Confirm that WinCC Runtime activates completely without hanging on the startup banner, and the operator overview picture displays.
2. Message System Operation: Open the WinCC Alarm Journal. Trigger a test process alarm from the AS; confirm the message displays immediately with correct timestamp, priority, and text.
3. Diagnostic Log Verification: Inspect C:\Program Files (x86)\Siemens\WinCC\Diagnostics\WinCC_Sys_01.log. Confirm that CCAlgRtServer.exe logs clean initialization with zero database error messages.
Limitations and Operational Precautions
Operational Precautions and Historical Data Salvage:
- Historical Alarm Data Loss: Moving corrupt archive segments removes historical alarm records from the active operator journal. If historical records must be preserved for regulatory compliance (e.g. FDA 21 CFR Part 11), submit the quarantined .mdf files to Siemens Industry Support for database salvage.
- Redundant Server Coordination: When performing archive cleanup, perform the procedure on one OS Server at a time; ensure the partner server continues serving process data to operators.
- Uninterruptible Power Supplies (UPS): Ensure all OS Server racks are powered via online double-conversion UPS units to prevent power outages from corrupting SQL Server write transactions.
Engineer FAQ
Why does WinCC Runtime hang only when Alarm Logging is selected in Startup?
Because the Alarm Logging engine (CCAlgRtServer.exe) encounters corrupted SQL Server archive segment files in the ArchiveManager\AlarmLogging directory and deadlocks trying to mount them.
Why didn't WinCC 'File > Reorganize' fix the problem?
Project reorganization only defragments project configuration tables (.dcf); it does not touch or repair historical circular archive files in the ArchiveManager folder.
What command completely resets WinCC runtime processes after a crash?
Executing CCResetRT.exe (located in C:\Program Files (x86)\Siemens\WinCC\bin) terminates all orphaned WinCC runtime processes safely.
Can I recover the alarms from the quarantined .mdf files?
Yes. Quarantined segments can often be re-attached as read-only historical archives or repaired by Siemens Technical Support.
Where are WinCC process diagnostic logs stored?
They are stored in C:\Program Files (x86)\Siemens\WinCC\Diagnostics\WinCC_Sys_01.log.
Technical References
- WinCC V7.5 Basic Process Control System Manual
- SIMATIC Process Control System PCS 7 OS Process Control Manual
- Siemens Industry Online Support WinCC Database Repair Guidelines
Related Articles
- Troubleshooting OS Project Download Failures from Engineering Station to OS Server in PCS 7
- Configuring Certified Antivirus Software and Real-Time Whitelisting for PCS 7 V9.0
- Controller Autonomy and Plant Availability During Complete OS Server Outage in PCS 7
Related Tags
- Alarm Logging
- WinCC Runtime
- SQL Database Repair
- ArchiveManager
- CCResetRT