Configuring WinCC Alarm Logging Segmentation, Automatic Backup, and Long-Term Archiving in SIMATIC PCS 7

Configuring WinCC Alarm Logging Segmentation, Automatic Backup, and Long-Term Archiving in SIMATIC PCS 7

To archive project alarms at regular intervals (such as every 6 months) and store them in an external repository without losing historical data, configure WinCC Alarm Logging database segmentation and automatic backups. In WinCC Explorer, open Alarm Logging, expand Archive Configuration, and open the Properties of Message Archive. Configure the revolving database with a total time span (e.g., 6 months) and a single segment duration (e.g., 1 day or 1 week). On the Backup Configuration tab, enable 'Activate backup' and specify a target network path (NAS or SAN). When a segment expires from active runtime, WinCC automatically detaches and transfers the archive files to the backup location.

Table of Contents

WinCC Alarm Logging Revolving Database Architecture

In SIMATIC PCS 7 OS, process alarm and event records are managed by the WinCC Alarm Logging component and stored within Microsoft SQL Server. Because industrial plants generate millions of discrete process alarms, operator actions, and system faults over time, unbounded database growth would eventually exhaust hard drive capacity and severely degrade runtime query performance.

To prevent database bloating while maintaining deterministic performance, WinCC employs a revolving segmented archive model. The runtime database consists of a circular ring of individual SQL database segments (*.mdf and *.ldf). As new alarms occur, they are written to the active segment. When the active segment fills or reaches its time limit, a new segment is spawned. When the cumulative archive size or time limit is reached, the oldest segment is dropped from the active runtime ring.

Configuring Message Archive Segmentation Time Periods

To configure segmentation parameters in WinCC Explorer:

  1. In WinCC Explorer on the OS Server (or Master ES), open the Alarm Logging editor.
  2. In the navigation tree, expand Archive Configuration.
  3. Right-click Message Archive and select Properties.
  4. In the General tab, configure the two fundamental boundaries:
    - Time period covered by a single segment: Sets the duration of one archive chunk (e.g., 1 Day, 1 Week, or 1 Month). Setting this to 1 Day creates compact daily segments with predictable file sizes.
    - Max. size of all segments / Time period covered by all segments: Sets the total retention duration of the live runtime database (e.g., 6 Months). With this setting, WinCC maintains 180 daily segments in active SQL storage, allowing operators to query any alarm from the last 6 months instantly from the alarm faceplate.

Automating Archive Segment Backup to Network Storage

Instead of allowing WinCC to permanently delete the oldest segment when the 6-month threshold is reached, configure automated backup to preserve historical compliance records indefinitely:

  1. In the Message Archive Properties dialog, select the Backup Configuration tab.
  2. Check the box Activate backup.
  3. Under Destination path, specify the target storage location (e.g., a mapped enterprise network drive, NAS, SAN, or secondary hard disk: \\NAS_Server\PCS7_Backups\AlarmArchive\).
  4. Optionally, specify an Alternative destination path to ensure redundancy if the primary network share becomes unreachable.
  5. When a daily segment exceeds the 6-month retention window, WinCC automatically copies the pair of database files (*.mdf and *.ldf) to the backup folder and then detaches it from the local SQL instance.
  6. The files are named using an ISO timestamp format representing the exact start and end times of the data chunk: <ProjectName>_<ServerName>_ALG_<DateFrom>_<DateTo>.mdf.

Reconnecting Archived Historical Segments in Runtime

Data outsourced to backup storage remains fully readable and can be dynamically brought back into active WinCC Runtime for incident audits:

  1. On the operating OS Server, open the Alarm Logging editor while WinCC Runtime is active.
  2. Navigate to Archive Configuration -> Message Archive.
  3. Right-click and select Connect to archive....
  4. Browse to the backup directory and select the desired .mdf segment file.
  5. WinCC dynamically attaches the database file to Microsoft SQL Server in read-only mode.
  6. Operators can immediately open the WinCC Alarm Control, select the Long-Term Archive List, and filter historical alarms from that specific date without restarting the OS Server.

Client vs Server Archiving Architecture in SIMATIC PCS 7

In distributed PCS 7 multi-client architectures, archiving rules are strictly centralized:

  • OS Servers: Alarm Logging runs exclusively on OS Servers (or OS Single Stations). The SQL Server instance on the server machine receives all alarms via raw S7 communication blocks (ALARM_8P) and handles all segmentation and backup transfers.
  • OS Clients: OS Clients possess zero local alarm databases. When an operator views alarm lists on a client, the client queries the OS Server via Server Data packages. Therefore, segmentation and backup configurations must never be attempted on OS Clients; they are configured exclusively on the OS Server projects.

Segmentation and Backup Configuration Parameter Schedule

The following schedule outlines recommended database configurations for various plant retention profiles:

Plant Requirement ProfileSingle Segment DurationTotal Active Time SpanMax Segment SizeBackup StrategyStandard Manufacturing1 Day1 Month (30 Days)200 MBLocal NAS share; daily rollover backupChemical / Pharmaceutical1 Day6 Months (180 Days)500 MBRedundant enterprise SAN with checksumsCritical Infrastructure1 Week1 Year (52 Weeks)2,048 MBCentral Process Historian (PH) replicationHigh-Alarm Rate Facility12 Hours3 Months1,024 MBDual-path network backup with NAS failover

Verification

Verify alarm archiving and backup automation through the following audit steps:

  1. In WinCC Explorer, verify that the Message Archive Properties dialog shows 'Activate backup' enabled with a validated destination path.
  2. In Windows File Explorer, navigate to the configured destination path and confirm that the SQL service account has write permissions.
  3. To test segment generation, temporarily configure a test project with a 1-hour single segment duration and confirm that detached .mdf files appear in the target folder after the hour expires.
  4. In WinCC Runtime, open the Alarm Control, click Connect to archive, select a backed-up segment, and confirm that historical messages populate the view immediately.

Limitations and Operational Precautions

Adhere to the following operational precautions:

  • Network Share Permissions: The Windows user account running the WinCC SQL Server service (NT SERVICE\MSSQL$WINCC or SIMATIC HMI user) must possess full Modify and Write NTFS permissions on the target network share; otherwise, backups will fail silently.
  • Never Delete Active Files via Windows Explorer: Never attempt to delete or move *.mdf or *.ldf files directly from the active project ArchiveManager\AlarmLog folder; modifying active files corrupts SQL Server catalog consistency.
  • Long-Term Enterprise Archiving: For plants requiring multi-decade data retention with automated regulatory reporting, deploy SIMATIC Process Historian (PH) rather than relying on manual file-based SQL segment reconnection.

Engineer FAQ

What happens if the backup storage network share becomes temporarily unreachable?

WinCC temporarily retains the detached segments in the local project directory and logs a system alarm. If an 'Alternative destination path' is configured, WinCC diverts the backup to the secondary path automatically.

Can the same segmentation and backup strategy be applied to analog process values?

Yes. The identical configuration procedure is available in the Tag Logging editor under Archive Configuration -> Tag Logging Fast / Slow.

How many historical segments can be reconnected to WinCC Runtime simultaneously?

While WinCC allows connecting multiple segments, connecting more than 20-30 historical segments concurrently can consume substantial SQL Server RAM and degrade live alarm recording performance. Disconnect historical segments when auditing is complete.

Technical References

Related Articles

Related Tags

  • WinCC Alarm Logging
  • Archive Configuration
  • Database Segmentation
  • Message Archive Backup
  • Connect to Archive
  • Process Historian
6 respuestas