Troubleshooting Missing WinCC Archive Segments and CCWriteArchiveServer Crashes in PCS 7
In SIMATIC PCS 7 (V8.0 through V9.1), gaps of several months in WinCC Alarm Logging and Tag Logging database directories (located in 'ArchiveManager\AlarmLogging' and 'TagLoggingFast/Slow') occur when the background archiving process 'CCWriteArchiveServer.exe' crashes silently on the OS Server. Unlike normal archive deletion (which purges oldest files continuously upon reaching capacity limits), multi-month gaps indicate that the write process terminated and was not restarted until an OS reboot or download occurred. To resolve this, check Windows Event Viewer for CCWriteArchiveServer crash exceptions, install the latest WinCC cumulative update, and configure process watchdog monitoring.
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
In regulated continuous process industries, the loss of historical operational data poses severe compliance, audit, and quality risks. In SIMATIC PCS 7 installations utilizing redundant WinCC OS Servers (e.g., V8.1 with WinCC V7.3 Upd4), automation engineers periodically audit the file system storage directories under \\<ServerName>\ArchiveManager\.
A distressing discovery occurs when administrators observe multi-month gaps in historical database files (ALG_*.mdf, TLG_F_*.mdf, TLG_S_*.mdf). For example, archive files exist for January through March, followed by zero records for April, May, and June, before suddenly resuming in July. Both redundant servers exhibit the identical gap. This guide explains why normal archive size limits do not create middle-history gaps, investigates the crash mechanics of CCWriteArchiveServer.exe, and provides steps to eliminate archiving failures.
Architecture and Fundamental Mechanics
The archiving subsystem in WinCC operates via decoupled Microsoft SQL Server background threads and dedicated Siemens archive writer processes:
-
Archive File Segmentation Architecture:
- When Tag Logging or Alarm Logging is configured in WinCC Explorer, administrators define segmentation boundaries: e.g., 'Time period of a single segment: 1 Month' and 'Max size of all segments: 100 GB'.
- Historical data is written into SQL Server database segment pairs: a data file (*.mdf) and a transaction log (*.ldf).
- Under normal operation, when the 'Max size of all segments' is reached, the WinCC DataManager continuously deletes the oldest segment to allocate space for new data. This rolling FIFO buffer NEVER creates gaps in the middle of a timeline; it only truncates the oldest historical tail. -
The Role of CCWriteArchiveServer.exe:
- Data transfer from memory buffers to physical SQL segment tables is managed by dedicated instances ofCCWriteArchiveServer.exe.
- In runtime, three separate instances of this executable run in the background:- Instance 1: WinCC Alarm Logging (
ALG) - Instance 2: WinCC Tag Logging Fast (
TLG_F- sub-second cyclic tags) - Instance 3: WinCC Tag Logging Slow (
TLG_S- long-term minute/hour tags)
- Instance 1: WinCC Alarm Logging (
-
The Silent Crash Phenomenon:
- IfCCWriteArchiveServer.exeencounters an unhandled exception—such as a database deadlock during AS delta compilation, memory corruption, or an unexpected SQL query timeout—the process crashes.
- Crucially, WinCC Runtime continues operating: operators can view live graphics, operate faceplates, and see real-time trends from memory buffers. No critical OS alarm is sounded.
- BecauseCCWriteArchiveServer.exehas died, no new.mdfsegments are created on disk for that subsystem. Only when the OS Server PC is rebooted, WinCC Runtime is deactivated/reactivated, or a full project download is deployed does the operating system restartCCWriteArchiveServer.exe, resuming segment creation and leaving a multi-month gap.
Step-by-Step Implementation Procedure
Follow these steps to diagnose and prevent missing WinCC archive segments in SIMATIC PCS 7:
-
Inspect Windows Application Event Logs for Crash Signatures:
- On both redundant OS Servers, open Windows Event Viewer (eventvwr.msc).
- Navigate toWindows Logs > Application.
- Filter by 'Event level: Error' and 'Event sources: Application Error'.
- Search for faults matching the date when archive file generation halted.
- Look for faulting application name:CCWriteArchiveServer.exe(Faulting module:ntdll.dll,CCDataServer.dll, orsqlncli11.dll). -
Inspect WinCC Diagnostic Logs:
- Open the directoryC:\Program Files (x86)\Siemens\WinCC\Diagnostics.
- OpenWinCC_Sys_01.logand search for keywords:ArchiveServer,WriteArchive,Fatal Error, orConnection to SQL Server lost. -
Update WinCC to the Latest Cumulative Update:
- In legacy releases (such as WinCC V7.3 Upd4 in PCS 7 V8.1), known software defects causedCCWriteArchiveServer.exeto deadlock or crash during background database garbage collection.
- Procure and install the latest released update: WinCC V7.3 Update 11 or higher (or the corresponding cumulative update for PCS 7 V9.0 / V9.1).
- Install the matching update on all OS Servers and OS Clients across the plant. -
Verify SQL Server Health and Database Configuration:
- Open SQL Server Management Studio (SSMS) on the OS Server.
- Verify database properties forWINCC: confirm that autogrowth is enabled and not restricted by fixed drive limits.
- Ensure the drives hostingArchiveManager(typicallyD:\orE:\) have ample free storage headroom (minimum 20% free space) to avoid SQL I/O write freezes. -
Implement Process Watchdog and Failure Alerting:
- Configure a simple Windows Task Scheduler watchdog script (PowerShell) to verify that three instances ofCCWriteArchiveServer.exeare running every 15 minutes:
Get-Process CCWriteArchiveServer | Measure-Object
- If the count drops below 3, the script triggers an email notification or restarts the service.
- Alternatively, deploy PCS 7 Maintenance Station with Process Monitoring enabled to raise an audible alarm if a core WinCC runtime executable terminates.
Verification
- In Windows Task Manager (Details tab), verify that exactly three instances of
CCWriteArchiveServer.exeare running under the logged-in SIMATIC user account. - Open
ArchiveManager\AlarmLoggingandTagLoggingFast: confirm that newly created.mdfand.ldfsegment files are actively incrementing in size. - Open a WinCC long-term trend control on an OS Client: span the ruler across current and recent hours, confirming that historical values are retrieved seamlessly without gaps.
- Review Windows Event Viewer over a 30-day operational period to confirm zero application errors for
CCWriteArchiveServer.exe.
Limitations and Operational Precautions
Historical data lost during periods when CCWriteArchiveServer.exe was inactive cannot be reconstructed retroactively unless buffered within an external Process Historian or redundant partner server that remained healthy. Never delete .mdf or .ldf files directly from ArchiveManager while WinCC Runtime is active, as this corrupts SQL attachment tracking. Hardware storage specifications, redundant server licensing, and update media should be verified through an authorized Siemens distributor or the Siemens Industry Mall.
Engineer FAQ
Why did both redundant servers stop archiving at the same time?
If both servers experience the identical software defect (e.g., triggered by a specific AS delta download, network-wide SQL timeout, or simultaneous memory leak), both instances of CCWriteArchiveServer.exe can crash around the same time.
How many instances of CCWriteArchiveServer.exe should run?
Three instances: one for Alarm Logging, one for Tag Logging Fast, and one for Tag Logging Slow.
Why does WinCC not display an alarm when the archive process dies?
WinCC graphics and alarming engines run in separate processes (pdlrt.exe, CCAlarmLogServer.exe). If the archive writer crashes, the real-time presentation layer remains unaware unless internal watchdog scripts are configured.
Does increasing total archive size recover the missing months?
No. Missing months represent data that was never written to disk. Increasing archive size only prevents the rolling deletion of older existing archives.
What update resolves known CCWriteArchiveServer crashes in WinCC V7.3?
Installing WinCC V7.3 Update 8 or Update 11 resolves critical database write deadlocks and crash vulnerabilities.
Technical References
- SIMATIC Process Control System PCS 7 OS Process Control (V8.1 / V9.0 / V9.1) Manual
- SIMATIC WinCC V7.3 WinCC Information System - Archive Configuration and Storage
- Siemens Industry Online Support FAQ 109740190 - Troubleshooting WinCC Archive Server Processes
Related Articles
- Diagnosing WinCC Redundancy Failures and Historical Alarm Storage Halts in PCS 7 V9.0
- Process Historian Architecture and Store & Forward Recovery Methodology in SIMATIC PCS 7
- Resolving Disabled WinCC Tag Logging and Alarm Logging Archive Configuration in PCS 7
Related Tags
- WinCC
- ArchiveManager
- CCWriteArchiveServer
- Alarm Logging
- Tag Logging
- PCS 7 V8.1