WinCC Alarm Logging Archive File Locations, Sizing, and Startup Optimization

WinCC Alarm Logging Archive File Locations, Sizing, and Startup Optimization

In SIMATIC PCS 7 V8.0 / V8.1, WinCC Alarm Logging database segments are located on the OS Server at: [Project_Path][PC_Station_Name]\wincproj[OS_Name]\ArchiveManager\AlarmLogging. WinCC stores process alarms across paired Microsoft SQL Server files (.mdf and .ldf). When archive file quantities and overall database size grow excessively, OS boot times and runtime initialization degrade severely because SQL Server must attach and verify every archive segment upon startup. To optimize startup speed safely, configure circular archiving limits and automated backup paths within WinCC Alarm Logging rather than manually deleting active database files in Windows Explorer.

Table of Contents

Directory Architecture of WinCC Alarm and Tag Logging Archives

In SIMATIC PCS 7 OS, process alarm events and analog value histories are managed by Microsoft SQL Server inside the ArchiveManager directory structure. For any configured Operator Station, the exact file path is structured as follows:

<Drive>:\<Project_Folder>\<PC_Station>\wincproj\<OS_Project>\ArchiveManager\

Within ArchiveManager, four dedicated subfolders manage runtime data:
- AlarmLogging\: Contains short-term and long-term process alarm segments (*_ALG_*.mdf and *_ALG_*.ldf).
- TagLoggingFast\: Stores high-frequency cyclic process trends ($< 1\text{ minute}$).
- TagLoggingSlow\: Stores low-frequency cyclic process trends ($> 1\text{ minute}$).
- CommonArchiving\: Used dynamically for attaching and restoring detached backup archive segments.

Root Cause Analysis - Database Growth and Startup Degradation

When an industrial plant experiences persistent alarm flooding (chattering digital sensors, improperly tuned PID control loops, or frequent equipment trips), the Alarm Logging database accumulates tens of thousands of messages daily.

If the archiving configuration is unmanaged (e.g., unlimited segment generation or excessively large total size thresholds), hundreds of individual *.mdf segment files accumulate on disk. When the OS Server reboots or restarts following a plant power failure, Microsoft SQL Server must inspect, verify the consistency of, and attach every registered segment in sequence. This causes runtime startup to freeze or hang for 20 to 45 minutes, creating severe operator interface delays during critical plant restarts.

Archive Configuration Parameters and Sizing Guidelines

The table below details standard sizing limits and parameters for WinCC Alarm Logging archive management:

Archive ParameterWinCC Configuration FieldRecommended Production ValueSystem Impact & BehaviorMax. Single Segment SizeMax. size of all segments (single)500 MB to 1.0 GBLimits individual MDF file size, ensuring fast file handling.Max. Total Archive SizeTotal size of all segments5 GB to 15 GBWhen exceeded, WinCC automatically purges the oldest segment.Time Period per SegmentTime period covered by a single segment1 Day or 1 WeekDetermines time window before a new segment is created.Total Time RetentionTime period covered by all segments1 Month to 3 MonthsOlder segments are deleted or moved to backup storage.Backup PathBackup configuration -> Destination pathDedicated Secondary Drive (E:\Backup)Automatically moves swapped segments off the system drive.Manual File DeletionWindows Explorer deletionPROHIBITEDCauses SQL SUSPECT database state; corrupts catalog.

Step-by-Step Procedure to Optimize and Purge Alarm Archives

  1. Access Alarm Logging Archive Configuration:
    - In WinCC Explorer on the OS Server, open Alarm Logging.
    - In the tree, select Archive Configuration -> Messages -> right-click Properties.
  2. Configure Segment Size and Time Boundaries:
    - Under Size of the message archive, set Maximum size of all segments to a manageable threshold (e.g., $10.0\text{ GB}$).
    - Set Maximum size of a single segment to $500.0\text{ MB}$.
    - Under Time period, set Time period covered by a single segment to 1 Week.
    - Set Time period covered by all segments to 1 Month (or plant required retention).
  3. Enable Automated Background Backup:
    - In the same dialog, navigate to the Backup configuration tab.
    - Check Activate backup.
    - Set the destination path to an external drive or dedicated network NAS share (e.g., D:\WinCC_Archive_Backups).
    - When local segments reach the size limit, WinCC copies them to the backup directory before detaching and deleting them locally.
  4. Execute Safe Database Reset (If Database Corrupted):
    - If the system is already hanging on boot, close WinCC and run CCResetProject.exe.
    - To perform a controlled clean rebuild of corrupted archives, launch the WinCC Project Duplicator or compile the OS with memory reset.

Verification

Verify archive optimization through the following checks:
1. Inspect <OS_Project>\ArchiveManager\AlarmLogging: verify that the total number of .mdf files stabilizes at the configured segment count (e.g., 4 to 8 active segments).
2. Initiate a planned OS Server reboot: confirm that WinCC OS Runtime launches and enters active process visualization within 2 to 4 minutes instead of experiencing lengthy hangs.
3. Verify that old segments are systematically created in the configured backup folder on secondary storage.

Limitations and Operational Precautions

Never manually delete .mdf and .ldf files in Windows Explorer while WinCC Runtime is active. Deleting attached files causes SQL Server to flag database corruption, throwing error 0x80004005 on subsequent compiles and crashing Alarm Logging. Always let WinCC manage segment deletion automatically via archive size thresholds. In pharmaceutical and regulated industries, ensure automated backup paths are verified to satisfy FDA 21 CFR Part 11 audit retention requirements.

Engineer FAQ

Technical References

Related Articles

Related Tags

  • Alarm Logging
  • ArchiveManager
  • WinCC Database
  • Startup Optimization
  • MDF Files
  • PCS 7 V8.1
6 respuestas