Troubleshooting Missing WinCC Archive Segments and CCWriteArchiveServer Crashes in PCS 7

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

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:

  1. 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.

  2. The Role of CCWriteArchiveServer.exe:
    - Data transfer from memory buffers to physical SQL segment tables is managed by dedicated instances of CCWriteArchiveServer.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)
  3. The Silent Crash Phenomenon:
    - If CCWriteArchiveServer.exe encounters 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.
    - Because CCWriteArchiveServer.exe has died, no new .mdf segments 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 restart CCWriteArchiveServer.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:

  1. Inspect Windows Application Event Logs for Crash Signatures:
    - On both redundant OS Servers, open Windows Event Viewer (eventvwr.msc).
    - Navigate to Windows 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, or sqlncli11.dll).

  2. Inspect WinCC Diagnostic Logs:
    - Open the directory C:\Program Files (x86)\Siemens\WinCC\Diagnostics.
    - Open WinCC_Sys_01.log and search for keywords: ArchiveServer, WriteArchive, Fatal Error, or Connection to SQL Server lost.

  3. Update WinCC to the Latest Cumulative Update:
    - In legacy releases (such as WinCC V7.3 Upd4 in PCS 7 V8.1), known software defects caused CCWriteArchiveServer.exe to 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.

  4. Verify SQL Server Health and Database Configuration:
    - Open SQL Server Management Studio (SSMS) on the OS Server.
    - Verify database properties for WINCC: confirm that autogrowth is enabled and not restricted by fixed drive limits.
    - Ensure the drives hosting ArchiveManager (typically D:\ or E:\) have ample free storage headroom (minimum 20% free space) to avoid SQL I/O write freezes.

  5. Implement Process Watchdog and Failure Alerting:
    - Configure a simple Windows Task Scheduler watchdog script (PowerShell) to verify that three instances of CCWriteArchiveServer.exe are 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

  1. In Windows Task Manager (Details tab), verify that exactly three instances of CCWriteArchiveServer.exe are running under the logged-in SIMATIC user account.
  2. Open ArchiveManager\AlarmLogging and TagLoggingFast: confirm that newly created .mdf and .ldf segment files are actively incrementing in size.
  3. 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.
  4. 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

Related Articles

Related Tags

  • WinCC
  • ArchiveManager
  • CCWriteArchiveServer
  • Alarm Logging
  • Tag Logging
  • PCS 7 V8.1
20 respuestas