Resolving Empty WinCC Event Lists and SQL Transaction Log Ballooning in SIMATIC PCS 7
When the WinCC Alarm Logging Event List becomes empty after approximately one week of continuous operation and recovers only after a computer restart, the failure is caused by Microsoft SQL Server database lockups triggered by an uncontrolled transaction log file (*RT.ldf) or exhausted circular archive segments. When SQL transaction logs balloon without checkpoint truncation, or when the number of connected single segments exceeds the SQL Server capacity limit (200 segments), the database engine rejects new insert transactions. To resolve this, configure proper Alarm Logging segment size limits (e.g. 500 MB to 2 GB max per segment), enable automatic backup to an archive path, and ensure SQL Server Service Packs are up to date.
Table of Contents
- WinCC Alarm Logging Database Architecture and Circular Segmentation
- Why the Event List Empties After Extended Runtime
- The Role of SQL Transaction Log (*RT.ldf) Ballooning
- SQL Server Connection Limits: The 200 Single Segment Rule
- Comparative Diagnostic Matrix: Alarm Database Degradation Symptoms
- Step-by-Step Maintenance and Archiving Configuration Workflow
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
WinCC Alarm Logging Database Architecture and Circular Segmentation
In SIMATIC PCS 7, alarm events, system messages, and operator actions are archived into a Microsoft SQL Server database managed by the WinCC Alarm Logging subsystem. To prevent a single monolithic database from growing infinitely and consuming all disk space, WinCC uses Circular Archiving with Segmented Databases:
- The runtime database consists of multiple pair files:
<Project>_ALG_<Date>_<Time>.mdf(Data file) and*.ldf(Transaction Log file). - A new segment is created based on configured triggers: either when a maximum time duration elapses (e.g. 1 week) or when the current segment file reaches a maximum size (e.g. 500 MB).
- When the total allocated archive capacity is reached, the oldest segment is deleted or backed up to long-term storage.
Why the Event List Empties After Extended Runtime
When operators report that the Alarm Control Event List suddenly goes completely blank after running for a week:
- The WinCC Data Manager attempts to query the active SQL database view (
ALGView). - If the active transaction log (
*RT.ldf) has grown uncontrollably (often exceeding 20 GB to 50 GB), SQL Server runs out of virtual address space or disk buffer handles. - SQL Server puts the database into a Suspect or Locked state, returning an empty record set or query timeout (Error 0x80040e31) to WinCC Alarm Control.
- Restarting Windows terminates hung locks and forces SQL Server recovery replay, temporarily restoring alarms until the transaction log fills again.
The Role of SQL Transaction Log (*RT.ldf) Ballooning
Transaction log ballooning occurs primarily due to:
-
Recovery Model Mismatch: WinCC project databases use the Simple recovery model by default, where transactions are truncated automatically upon checkpoints. If third-party backup agents or incorrect maintenance scripts switch the database to Full recovery, logs never truncate without transaction log backups.
-
Unchecked Alarm Chattering: A chattering digital input generating 100 alarms per second floods the transaction queue with hundreds of thousands of commits per hour.
-
Failed Automatic Backup: If an archive backup path is defined on an unreachable network share, WinCC holds the segment open indefinitely.
SQL Server Connection Limits: The 200 Single Segment Rule
Siemens documentation (SIOS FAQ ID 34473263) strictly defines SQL Server scalability limits in PCS 7:
-
Maximum 200 Attached Single Segments: The Microsoft SQL Server instance running under WinCC can maintain a practical maximum of 200 connected database segments (combining Alarm Logging and Tag Logging archives).
-
If an engineer configures segments to create every hour or every day without archiving, the attached segment count rapidly exceeds 200, causing severe database performance degradation, delayed faceplates, and empty alarm journals.
Comparative Diagnostic Matrix: Alarm Database Degradation Symptoms
The following table correlates alarm archive symptoms with their underlying database causes:
*RT.ldf transaction log / buffer exhaustionsqlservr.exeStep-by-Step Maintenance and Archiving Configuration Workflow
Follow this procedure to permanently stabilize the WinCC Alarm Logging database:
- Audit Archive Settings: Open WinCC Explorer -> Alarm Logging. Right-click Messages -> Archive Configuration.
- Configure Segment Duration and Size:
- Under Time period of all segments, specify total retention (e.g. 1 month).
- Under Max size of all segments, allocate appropriate capacity (e.g. 10 GB).
- Under Time period covered by a single segment, set 1 Week (or 1 Month for low alarm volumes).
- Under Max size of a single segment, set 1000 MB (1 GB). - Enable Backup Path: Check 'Automatic backup' and select a valid local secondary hard drive or NAS path.
- Shrink Bloated Transaction Log: If
*RT.ldfis already tens of gigabytes, close WinCC Runtime. Open SQL Server Management Studio (SSMS), executeDBCC SHRINKFILEon the log file, and verify database recovery model is set to Simple. - Identify Chattering Alarms: Open the WinCC Alarm Control hit list. Filter by highest frequency. Fix field instruments generating continuous alarms.
Verification
Verify database stability through these checks:
- Continuous Runtime Test: Monitor WinCC Runtime over a 14-day cycle; confirm the Event List never empties or freezes.
- Attached Segments Audit: In SSMS, query
sys.databases. Confirm total attached WinCC databases remain well below 200. - Transaction Log Size Stability: Confirm
*RT.ldffile size remains stable (typically under 100 MB to 500 MB) and does not grow continuously. - Backup Segment Creation: Verify that when a week elapses, a new segment MDF/LDF is generated and the old segment copies to the backup path.
Limitations and Operational Precautions
Observe the following database safeguards:
-
Never Manually Delete Active LDF Files: Deleting the active transaction log file while SQL Server is running corrupts the WinCC project database and prevents WinCC from opening.
-
Do Not Use Third-Party SQL Shrink Jobs: WinCC manages its own database lifecycle; external automated SQL maintenance scripts that alter indexes or detach files can cause fatal WinCC crashes.
-
Commercial Accuracy Disclaimer: Software order numbers (MLFBs), package structures, and hardware capacity prerequisites vary across PCS 7 versions and hardware platforms. System integrators must confirm exact software entitlements and licensing requirements against the official Siemens Catalog CA 01 and obtain an authorized Siemens distributor quotation prior to purchasing.
Engineer FAQ
Can I set WinCC database segments to create a new file every hour?
No. Creating a segment every hour produces 168 segments per week, quickly exceeding the 200-segment limit and causing database failure.
What is the recommended size and duration for a single WinCC archive segment?
Configure a duration of 1 week (or 1 month for low traffic) with a maximum size of 500 MB to 2 GB per single segment.
Does WinCC support automatic archiving to external network storage?
Yes, Alarm Logging and Tag Logging can be configured with an automatic backup destination path pointing to a shared network folder or NAS.
Technical References
- Siemens Industry Online Support (SIOS) FAQ: Connected Segments to SQL Server in PCS 7 (Entry ID: 34473263)
- SIMATIC WinCC V7.4 / V7.5 Alarm Logging Configuration Manual (Entry ID: 109746516)
- Microsoft SQL Server 2014 Database Maintenance Guide (Entry ID: 109746517)
- SIMATIC Process Control System PCS 7 OS Process Control System (Entry ID: 109751825)
Related Articles
- Configuring WinCC Alarm Logging Segmentation, Automatic Backup, and Long-Term Archiving in SIMATIC PCS 7
- Resolving PH-Ready Error in WinCC OS - WinCC Alarm System Not Initialized
- Troubleshooting Slow WinCC Graphic Screen Changes on Engineering Stations
Related Tags
- SIMATIC WinCC
- Alarm Logging
- SQL Server
- Transaction Log
- LDF Ballooning
- Archive Segments
- Event List Empty