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
- Configuring Message Archive Segmentation Time Periods
- Automating Archive Segment Backup to Network Storage
- Reconnecting Archived Historical Segments in Runtime
- Client vs Server Archiving Architecture in SIMATIC PCS 7
- Segmentation and Backup Configuration Parameter Schedule
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
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:
- In WinCC Explorer on the OS Server (or Master ES), open the Alarm Logging editor.
- In the navigation tree, expand Archive Configuration.
- Right-click Message Archive and select Properties.
- 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:
- In the Message Archive Properties dialog, select the Backup Configuration tab.
- Check the box Activate backup.
- 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\). - Optionally, specify an Alternative destination path to ensure redundancy if the primary network share becomes unreachable.
- When a daily segment exceeds the 6-month retention window, WinCC automatically copies the pair of database files (
*.mdfand*.ldf) to the backup folder and then detaches it from the local SQL instance. - 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:
- On the operating OS Server, open the Alarm Logging editor while WinCC Runtime is active.
- Navigate to
Archive Configuration -> Message Archive. - Right-click and select Connect to archive....
- Browse to the backup directory and select the desired
.mdfsegment file. - WinCC dynamically attaches the database file to Microsoft SQL Server in read-only mode.
- 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:
Verification
Verify alarm archiving and backup automation through the following audit steps:
- In WinCC Explorer, verify that the Message Archive Properties dialog shows 'Activate backup' enabled with a validated destination path.
- In Windows File Explorer, navigate to the configured destination path and confirm that the SQL service account has write permissions.
- To test segment generation, temporarily configure a test project with a 1-hour single segment duration and confirm that detached
.mdffiles appear in the target folder after the hour expires. - 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$WINCCor 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
*.mdfor*.ldffiles directly from the active projectArchiveManager\AlarmLogfolder; 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
- SIMATIC Process Control System PCS 7 Operator Station Manual (Entry ID: 109746516)
- WinCC V7.3 / V7.4 System Manual: Working with WinCC - Setting up a Message System
- Siemens Industry Online Support (SIOS) FAQ: WinCC Archive Configuration and Backup (Entry ID: 22123987)
- SIMATIC Process Historian Administration and Maintenance Guide (Entry ID: 109746517)
Related Articles
- Calculating Daily Total Alarms per Area in CEMAT and Configuring Popup Alarm Lists
- Activating Acoustic Alarm Horn Sounds on Newly Commissioned OS Clients
- Restoring Missing Report Templates and RDL Definitions in SIMATIC Information Server
Related Tags
- WinCC Alarm Logging
- Archive Configuration
- Database Segmentation
- Message Archive Backup
- Connect to Archive
- Process Historian