Diagnosing WinCC Redundancy Failures and Historical Alarm Storage Halts in PCS 7 V9.0
In SIMATIC PCS 7 V9.0 SP2, when historical alarms stop saving to logs (appearing in runtime banners but vanishing upon acknowledgment or refresh) and the redundant OS server reports 'The connection to the master was interrupted' with instant false synchronization, the root cause is a crash or deadlock of CCWriteArchiveServer.exe caused by corrupted archive segment databases (ALG.mdf). When an archive switch fails ('Failed to switch archive'), the archive writer crashes, halting disk writes while volatile RAM buffers keep displaying live alarms. To resolve this: 1) Collect diagnostics using SIMATIC Assessment Suite - Data Collector (SAS-DC); 2) Deactivate WinCC Runtime on both servers; 3) Move locked/faulty archive files out of the ArchiveManager folder; 4) Execute CCArchiveManager.exe -reset all to restore clean archive tracking; and 5) Delete the project .dcf file and reactivate runtime.
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 high-availability SIMATIC PCS 7 OS architectures, redundant server pairs (OSS1 and OSS2 on Windows Server 2016) ensure uninterrupted supervision and historical alarm archiving. Following an interrupted download or power disturbance, engineers frequently encounter a catastrophic archiving failure: new alarms display in the live operator alarm control, but acknowledging or refreshing the screen causes all events to disappear permanently from historical logs. Concurrently, the WinCC system tray flags the redundant partner with red status, and the standby server logs recurring connection interruption alarms. This technical guide analyzes the failure mechanics of CCWriteArchiveServer.exe, diagnoses SQL Server segment switching faults, and provides the step-by-step restoration procedure.
Architecture and Fundamental Mechanics
Alarm Archiving and Redundancy Synchronization Mechanics
+-------------------------------------------------------------------------+
| WinCC OS Server Runtime |
| |
| Alarm Logging Subsystem: |
| - Live Messages Arrive -> Cached in Volatile RAM Buffer (Displayed OK)|
+-----------------------------------|-------------------------------------+
|
v Writes to Disk
+-------------------------------------------------------------------------+
| Archive Writer Daemon: CCWriteArchiveServer.exe |
| |
| FAILURE CONDITION: |
| 1. New archive segment requested -> SQL returns 'Failed to switch' |
| 2. Underlying MDF/LDF database file is locked or corrupted |
| 3. CCWriteArchiveServer.exe HANGS or CRASHES! |
| |
| CONSEQUENCES: |
| - Live RAM alarms NEVER get committed to SQL database tables! |
| - Screen refresh purges RAM buffer -> ALARMS VANISH! |
| - Redundancy sync daemon (CCRedTrans.exe) cannot compare segments |
| - Redundancy FAILS: 'The connection to the master was interrupted' |
+-----------------------------------|-------------------------------------+
|
v Recovery Action
+-------------------------------------------------------------------------+
| 1. SAS-DC Diagnostic Data Collection |
| 2. Deactivate Runtime & Purge locked ArchiveManager MDF files |
| 3. CCArchiveManager.exe -reset all & Delete Project .dcf |
| 4. Reactivate Runtime -> Full Redundant Archiving Restored! |
+-------------------------------------------------------------------------+
The Breakdown Cascade
- RAM Buffer vs. SQL Archiving: WinCC Alarm Logging maintains an in-memory ring buffer for immediate screen updates and a separate background service (
CCWriteArchiveServer.exe) that batches and commits events into time-stamped SQL Server database segments ([Project]_ALG_*.mdf). IfCCWriteArchiveServer.exeterminates, the GUI continues displaying live alarms from RAM, but no disk writes occur. - Segment Switching Failure: WinCC splits archives into discrete time slices (e.g., 1 day or 1 week). When a time boundary is reached, WinCC unmounts the old segment and attaches a new one. If an earlier download was aborted mid-synchronization, SQL Server holds conflicting file locks, causing the switch to abort (
Failed to switch archive). - Redundancy State Corruption: WinCC Redundancy synchronization (
CCRedTrans.exe) relies on matching segment lists between master and standby. When the archive writer on one server fails, the redundancy state machine cannot establish segment parity, causing spurious connection drop alarms.
Step-by-Step Implementation Procedure
Step 1: Collect System Diagnostics via SAS-DC
- Before altering files, download and run the SIMATIC Assessment Suite - Data Collector (SAS-DC) (formerly SDT, SIOS Entry ID
65976201) on both OS servers. - Execute the data collector to gather Windows event logs, WinCC diagnostic logs (
WinCC_Sys_*.log), SQL error logs, and redundancy traces for historical audit.
Step 2: Deactivate WinCC Runtime on Both OS Servers
- Deactivate WinCC Runtime on the standby server (
OSS2). - Wait for deactivation to complete cleanly.
- Deactivate WinCC Runtime on the master server (
OSS1). - Verify in Windows Task Manager that all instances of
CCWriteArchiveServer.exe,CCDataSync.exe, andSCRIPT.EXEhave closed.
Step 3: Relocate Locked and Faulty Archive Segment Files
- On both OS servers, open Windows Explorer and navigate to the project folder.
- Open the directory:
[Project_Path]\ArchiveManager\. - Locate the subfolders:
AlarmLogging,TagLoggingFast,TagLoggingSlow. - Move all recent
*.mdfand*.ldffiles associated with the failed segment switch dates into a temporary backup directory on driveD:. - Leave older, healthy historical segments intact.
Step 4: Execute Archive Manager Reset
- On
OSS1, open Command Prompt as Administrator. - Execute the global archive manager reset command:
cmd CCArchiveManager.exe -reset all - This purges corrupted runtime tracking tables and resets segment pointers to clean defaults.
- Repeat this command on
OSS2.
Step 5: Delete Project .dcf and Reactivate Redundant Runtime
- In the project root directory on both servers, delete
[ProjectName].dcf. - Launch WinCC Explorer on
OSS1. - Re-verify archive retention durations in Alarm Logging and Tag Logging properties (e.g., set to 1 month / 6 months as per plant design).
- Activate WinCC Runtime on
OSS1. Verify thatCCWriteArchiveServer.exestarts and creates a fresh active segment. - Activate WinCC Runtime on
OSS2. Monitor the Redundancy Control window until full synchronization completes cleanly.
Verification
- Process Task Check: In Task Manager under Details, confirm that three instances of
CCWriteArchiveServer.exeare active and consuming<1% CPUwith stable memory. - Live Alarm Archiving Test: In CFC, trigger a test alarm on a spare digital input. Acknowledge the alarm on the WinCC screen. Refresh the alarm log view or navigate to the Long-Term Archive list; confirm the alarm remains visible with time stamps intact.
- Redundancy Tray Status: Check the WinCC Redundancy system tray icon on both servers. Confirm that both icons show green (Partner Connected and Synchronized), with zero 'Connection to master interrupted' alarms.
Limitations and Operational Precautions
- Archive Reset Data Impact: Running
CCArchiveManager.exe -reset allremoves runtime tracking references for active uncommitted segments; historical data backed up in Step 3 must be linked via WinCC Trend/Alarm Control backup attachment if required. - SQL Server Service State: If Microsoft SQL Server (
MSSQL$WINCC) itself is corrupt or its transaction logs (LDF) are damaged, SQL Server service recovery or project duplication may be required.
Engineer FAQ
Why did alarms appear on screen but fail to save in the archive?
Alarms were held in the temporary RAM display buffer, but CCWriteArchiveServer.exe was hung or crashed and could not commit them to SQL disk tables.
What does 'Failed to switch archive' mean?
WinCC could not close the current archive segment or create a new MDF segment due to database corruption, disk lock, or duplicate file GUIDs.
What is CCWriteArchiveServer.exe?
It is the background executable responsible for writing live Alarm Logging, Tag Logging Fast, and Tag Logging Slow data into SQL Server archive files.
Why did the standby server report 'Connection to master was interrupted'?
Redundancy synchronization failed because the archive segment catalog was corrupt, breaking the CCRedTrans comparison engine.
What tool collects Siemens diagnostic logs?
SIMATIC Assessment Suite - Data Collector (SAS-DC), available under SIOS Entry ID 65976201.
Does CCArchiveManager.exe -reset all delete process tags?
No. It resets only runtime archive manager tracking tables; configured tags, graphics, and CFC charts are completely safe.
How many instances of CCWriteArchiveServer should be running?
Normally three: one for Alarm Logging, one for Tag Logging Fast, and one for Tag Logging Slow.
Can I restore the old archive MDF files later?
Yes, healthy MDF files can be attached as historical backups using the 'Add Backup' feature in WinCC Alarm/Trend Control.
Why did stopping and restarting runtime not fix the problem initially?
Because the corrupted MDF file handles and damaged .dcf tracking records remained in place, causing the archive switch to fail immediately on restart.
What Windows OS was this tested on?
Windows Server 2016 Standard / Datacenter running SIMATIC PCS 7 V9.0 SP2.
Technical References
- SIMATIC WinCC V7.4 SP1 / V7.5 WinCC Information System - Redundant Systems Manual
- Siemens Industry Online Support (SIOS) Entry ID 65976201: SIMATIC Assessment Suite - Data Collector (SAS-DC)
- Siemens Industry Online Support (SIOS) Entry ID 109780813: Troubleshooting WinCC Archive Manager and Segment Switching
- SIMATIC PCS 7 Compendium Part A - System Maintenance and Redundancy Architecture
Related Articles
- Restoring Corrupted WinCC Tag Logging Archives and Fast Trends Following OS Server Power Failures
- Resolving Disabled WinCC Tag Logging and Alarm Logging Archive Configuration in PCS 7
- Troubleshooting Process Historian Connection Failures to Redundant OS Servers in PCS 7
Related Tags
- Alarm Logging
- WinCC Redundancy
- CCWriteArchiveServer
- Failed to Switch Archive
- SAS-DC
- ArchiveManager
- PCS 7 V9.0 SP2