Overview
WinCC Unified V19 stores runtime alarm events in a SQL-based archive only after the Archive Manager service is installed, activated, and bound to a logging database. Without that service running, the Unified HMI alarm grid control shows only the volatile online alarm buffer; that buffer is cleared on every restart of the runtime. Configuring alarm history therefore requires three discrete deployments: (1) the WinCC Unified Runtime host (PC Runtime or Unified Comfort Panel), (2) the Archive Manager service, which can run on the same host or on a dedicated archive server, and (3) a SQL Server instance that physically holds the archive segments. Once those components are wired together through TIA Portal V19, operators can open an historical time range in the alarm grid and see exactly when each alarm was raised, when it cleared, and who acknowledged it, with millisecond resolution for diagnostics and audit purposes.
This article documents the procedure to deploy and commission alarm history in WinCC Unified V19, the SQL Server requirements that the Archive Manager enforces, the engineering steps inside TIA Portal, and the runtime verification checks that confirm events are actually written to the database. The troubleshooting matrix at the end catalogs the most common faults that operators encounter when the alarm grid control unexpectedly shows an empty historical view. For the upstream product overview, see the TIA Portal product page and the Siemens Industry Online Support (SIOS) knowledge base.
Architecture and Data Flow
Alarm events originate at the Unified Runtime. Each Runtime — whether the PC Runtime on a WinCC Unified station or the firmware on a Unified Comfort Panel — maintains its own circular online alarm buffer. When an alarm becomes active, clears, or is acknowledged, the Runtime timestamps the event and writes it to that buffer. The default buffer size in WinCC Unified V19 is 1,000 entries per alarm class, and the buffer is held in process memory.
The Archive Manager is a Windows service that subscribes to the Runtime alarm stream. As soon as the service detects an event, it forwards the event to the SQL archive database configured for that Runtime. The SQL archive is segmented by time — by default one segment per day — so the database can be backed up, archived, or purged by segment without locking the live runtime tables. The HMI alarm grid control on a Unified screen queries the archive through the WinCC Unified data service whenever the operator selects a historical time range, and it displays the events ordered by their TimeRaised timestamp.
| Component | Version / SKU | Role |
|---|---|---|
| TIA Portal | V19 Update 2 or later | Engineering, archive configuration, project compile and download |
| WinCC Unified PC Runtime | V19 (16 GB or 32 GB archive option) | Runtime host for archive subscription on PC systems |
| WinCC Unified Comfort Panel | MTP700 / MTP1000 / MTP1200 / MTP1500 / MTP1900 / MTP2200 with firmware V19 | Runtime host on panel systems |
| Archive Manager service | Installed via SIMATIC Unified Runtime V19 setup (feature "Archive Manager") | Forwards runtime events to SQL |
| SQL Server | 2019 (15.0.x) or 2022 (16.0.x), Standard or Enterprise | Persistent store for archive segments |
| HMI Alarm Control (Alarm Grid) | TIA Portal V19 toolbox -> Controls | Operator visualization for live and historical alarms |
Prerequisites
- TIA Portal V19 with the WinCC Unified option installed. The engineering license covers the alarm history configuration; the runtime archive is licensed through the Unified Runtime archive option (6AV2153-1xx or 6AV2154-1xx series).
- SIMATIC WinCC Unified Runtime V19 installed on the runtime host. The Archive Manager feature must be selected during setup.
- Microsoft SQL Server 2019 or 2022 (Standard or Enterprise edition) installed on the archive server or co-located with the runtime. SQL Server Express is technically installable but is not recommended for production alarm history because of the 10 GB database size cap.
- Windows user account that will run the Archive Manager service. Use a dedicated domain service account where the runtime and archive are on separate hosts; do not run the service as LocalSystem when the SQL Server is on a remote host with Windows authentication.
- The service account must be granted
dbcreatorandsecurityadminserver roles on the SQL Server instance during the first commissioning so the Archive Manager can create the archive database and the internal user logins. - TCP port 1433 (or the configured SQL Browser instance port) reachable from the runtime host to the archive host.
- Time synchronization between the runtime host, the Archive Manager host, and the SQL Server. Domain-joined hosts joined to a hierarchy with an NTP source are recommended.
Step-by-Step Configuration
Step 1: Install and Start the Archive Manager Service
- Insert or mount the SIMATIC WinCC Unified V19 installation media and launch the setup on the host that will run the Archive Manager. The same setup also installs the PC Runtime, so on a single-host system both can be selected.
- On the "Component selection" dialog, enable "Archive Manager". The feature is nested under "WinCC Unified Runtime" -> "Services".
- Accept the default installation path or change it to a volume with sufficient free space. The Archive Manager writes small staging files to
%ProgramData%\Siemens\Automation\WinCCUnified\ArchiveManager. - Complete the installation. The setup registers the service "SIMATIC WinCC Unified Archive Manager" (executable
ScsArchiveManager.exe) and sets its startup type to Manual. - Open
services.msc, locate "SIMATIC WinCC Unified Archive Manager", open Properties, and change the Startup type to Automatic (Delayed Start). Delayed Start avoids contention if SQL Server is set to Automatic as well. - Set the "Log On" account to the dedicated service account created for the Archive Manager, then start the service.
- Open the Windows Event Viewer -> Windows Logs -> Application and confirm entry "Archive Manager started successfully" with Event ID 1000. Event ID 1001 indicates the service is shutting down; Event ID 1500 indicates a database connection failure.
Step 2: Create the SQL Archive Database
The Archive Manager can create the archive database automatically the first time it is started against an empty instance, but you must first ensure the service account has the rights to do so. The recommended approach is to pre-create the database so you can control collation, file growth, and recovery model.
- Open SQL Server Management Studio and connect to the target instance as a sysadmin.
- Expand Security -> Logins and create a new login named, for example,
SIMATICArchive. Set the default database tomaster; you can leave password policy disabled for service accounts. - Right-click the login -> Properties -> Server Roles and enable
dbcreatorandsecurityadmin. These roles are required only during initial commissioning; after the database is created, the login can be granteddb_owneron the archive database. - Right-click Databases -> New Database. Name the database
UnifiedArchiveDB. Use the default recovery model of Full if the archive must support point-in-time restore; switch to Simple if nightly full backups are sufficient. - Set the initial MDF size to at least 500 MB with 100 MB autogrowth, and the LDF to 100 MB with 50 MB autogrowth. Pre-sizing prevents autogrow stalls during the first alarm storms.
- Set the database owner to
SIMATICArchive. - Click OK to create the database.
- If using SQL Server 2022, confirm the database compatibility level is 150 or 160. WinCC Unified V19 does not require compatibility level above 150.
Step 3: Configure the Archive Connection in TIA Portal
- Open the WinCC Unified project in TIA Portal V19.
- In the project tree, expand the Unified HMI device and open "Runtime settings".
- Select the "Alarms" node. Enable the option "Log alarms". Without this checkbox, the Archive Manager receives no subscription for alarm events even if the service is running.
- Switch to the "Archive" subnode and click "Add archive".
- Choose "SQL database (WinCC Unified Archive Manager)" as the archive type. The older "File-based archive" option is retained only for legacy migrations.
- Enter the host name of the Archive Manager service. Use a fully qualified domain name (FQDN) so that name resolution is consistent across domain controllers.
- Enter the SQL connection string. For Windows authentication with a service account:
Provider=MSOLEDBSQL.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=UnifiedArchiveDB;Data Source=ARCHSRV\INST01;Trust Server Certificate=True
- For SQL authentication, substitute the credentials:
Provider=MSOLEDBSQL.1;User ID=SIMATICArchive;Password=********;Initial Catalog=UnifiedArchiveDB;Data Source=ARCHSRV\INST01;Trust Server Certificate=True
- Set the segment size. The default of 1 day is appropriate for most applications. Increase to 7 days if the operator panels are slow to start and the archive is rarely consulted.
- Set the segment timeout. The default of 30 days means the Archive Manager will delete segments older than 30 days. For audit-grade retention, raise this to 365 days or longer and back the archive up before segments expire.
- Compile the project (Project -> Compile -> Software (rebuild all)) and download it to the Unified Runtime.
Step 4: Configure Alarm Class Logging Behavior
Inside the same "Alarms" editor, expand each alarm class and confirm which state transitions are written to the archive. Logging too many low-priority alarms can fill the archive quickly and increase SQL Server I/O. The recommended baseline for a manufacturing cell is shown below.
| Alarm class | Log active | Log inactive | Log acknowledgement | Comment |
|---|---|---|---|---|
| Errors (priority 1) | Yes | Yes | Yes | Required for downtime analysis |
| Warnings (priority 2) | Yes | Yes | No | Captures transient issues without ACK overhead |
| System (priority 3) | Yes | No | No | Raised events only; cleared events are implicit |
| Information (priority 4) | Optional | No | No | Disable in noisy processes to control archive growth |
Step 5: Configure the HMI Alarm Grid Control
- Open the screen in TIA Portal V19 where the historical alarm view should appear.
- Drag an "Alarm Control" (TIA Portal toolbox: Controls -> Alarm) onto the screen. In WinCC Unified, this control is also referred to as the Alarm Grid Control.
- Open the Properties pane and bind the "Alarm source" property to the runtime. For historical views, set the source to "Archive" rather than "Online".
- Configure the visible columns. The recommended set is: TimeRaised (HH:mm:ss.fff), TimeCleared, TimeAcknowledged, State, AlarmClass, AlarmText, Area, Source, UserName.
- Enable the time range filter and set the default range to "Last 24 hours". Operators can extend this to "Last 7 days" once the archive has accumulated data.
- Enable the export to CSV function so operators can download historical alarms for external analysis. The export uses the runtime local temp folder; ensure the runtime has write access.
- Configure the row limit. WinCC Unified V19 supports up to 10,000 rows in the grid; for larger result sets, the operator must use the filter or export function.
- Add an "Update" button bound to the "Refresh" method of the control so operators can manually refresh after changing the time range.
Verification Procedure
- From the runtime, trigger a tagged alarm by setting the corresponding tag value through the TIA Portal online watch table or by forcing a bit in the PLC.
- Acknowledge the alarm from the live alarm grid on the runtime screen.
- Clear the alarm by resetting the tag.
- Open the historical view of the alarm grid and set the time range to include the timestamp of the triggered alarm.
- Verify that the row appears with all three timestamps (TimeRaised, TimeCleared, TimeAcknowledged) populated.
- On SQL Server Management Studio, run the following query against the archive database:
SELECT TOP 50 * FROM UnifiedArchiveDB.dbo.ALGview ORDER BY TimeRaised DESC
- Confirm at least three rows are returned for the test alarm: one for raised, one for acknowledged, one for cleared.
- Open services.msc on the archive server and confirm the "SIMATIC WinCC Unified Archive Manager" service is in Running state and has been running continuously since commissioning.
- Reboot the Unified Runtime host. After the restart, open the historical view and confirm the previously archived alarms are still present.
Performance, Backup, and Redundancy Tuning
Plants with continuous processes — for example, pharmaceutical batching or paper mills — can produce several alarm events per second. Out-of-the-box settings may struggle at that rate. Apply the following measures only after the system has been verified to capture alarms correctly.
- Increase the SQL Server
max server memoryto 60-70% of physical RAM on the archive host. - Place the MDF and LDF on separate physical volumes backed by independent disk controllers.
- Change the recovery model to Simple if nightly full backups are sufficient. This eliminates the LDF growth that the Full model produces for high-volume inserts.
- Reduce the number of alarm classes that write acknowledgements; ACK writes are the most expensive operations on the archive.
- On the runtime host, raise the "Alarm log buffer" parameter in TIA Portal under "Runtime settings" -> "Alarms" -> "Online buffer" from the default 1,000 to 5,000 if the runtime momentarily loses the connection to the archive.
Two retention policies compete in the Archive Manager: the segment timeout enforced by the service and the file-level backups performed by the SQL administrator. They must be coordinated so that no gap appears between when the Archive Manager deletes a segment and when the SQL backup is verified restorable.
- Set the SQL Server backup job (via Maintenance Plan or Ola Hallengren scripts) to full backup nightly at a fixed time outside shift handover.
- Set the segment timeout in TIA Portal to twice the backup retention period. If SQL full backups are kept for 30 days, set the segment timeout to 60 days; this gives a 30-day cushion to restore the archive if a backup is corrupted.
- Archive the CSV exports from operator panels to a network share or document management system for tamper-evident records.
- Test the restore procedure quarterly. A backup that has never been restored is a backup that does not exist.
WinCC Unified V19 supports redundant archive configurations through SQL Server Always On Availability Groups. The Archive Manager can be configured to write to a named instance that fails over transparently when the primary replica goes offline.
- Create an Always On Availability Group with two SQL Server replicas (primary and secondary) on separate hosts.
- Add the archive database to the availability group with synchronous commit and automatic failover.
- In TIA Portal, set the SQL connection string
Data Sourceto the Availability Group listener name (for example,ARCHSRV-LISTENER) rather than to a specific instance. - Configure the SQL Server listener to listen on TCP/1433 and to register SPNs for the service account.
- Test failover by stopping the SQL Server service on the primary replica and confirming the Archive Manager reconnects within seconds.
Migration from WinCC Professional / Flexible
Projects migrated from WinCC Professional V17 or earlier store alarm history in a different schema. The TIA Portal V19 migration wizard translates the legacy alarm configuration into Unified alarms, but the archive itself must be re-created. The recommended approach is to keep the legacy runtime online long enough to export the last 30 days of alarms via CSV, then commission the new Unified archive and import the CSV if regulatory traceability requires it. After migration, retire the legacy CCALGv database and archive the CSV exports for the retention period required by your quality system.
Troubleshooting Matrix
| Symptom | Likely cause | Resolution |
|---|---|---|
| Alarm grid shows live buffer only, no historical events | Archive Manager service not running | Start "SIMATIC WinCC Unified Archive Manager"; verify Event ID 1000 in Application log |
| Service starts then exits within 30 seconds | SQL connection failure (wrong instance, blocked port, bad credentials) | Create a UDL file on the archive host to test the connection; verify TCP/1433 with Test-NetConnection; check SQL Browser service is running |
| SQL shows no new rows despite active alarms | "Log alarms" checkbox not enabled | Open TIA Portal -> Runtime settings -> Alarms -> enable Log alarms; recompile and redownload |
| Archive grows uncontrollably | All alarm classes logging all states | Apply the recommended logging matrix; raise segment timeout and add a purge job |
| Timestamps off by one hour | Daylight saving transition or wrong time zone on archive host | Set all hosts to UTC and enable automatic DST handling; verify Windows time zone configuration |
| Historical view empty after runtime restart | Archive Manager not started before runtime | Set Archive Manager to Automatic (Delayed Start); set service dependencies on SQL Server |
| Event ID 1500 in Windows log | SQL login lacks dbcreator | Grant dbcreator and securityadmin to the Archive Manager service account, restart service |
| Operator cannot change time range filter | User authorization configured to read-only | In TIA Portal -> Security -> User administration, add the operator role to the alarm grid control and enable "Change time range" permission |
| Alarm grid shows only the first 1,000 rows | Row limit reached | Use the filter or export function; raise the row limit up to 10,000 in the control properties |
Security and Compliance Notes
Alarm history frequently contains process secrets — for example, batch IDs that link to product specifications, or operator IDs that can be used to infer shift patterns. Apply the following baseline protections.
- Restrict SQL Server logins to the archive database only. Do not grant sysadmin to the Archive Manager service account.
- Encrypt the SQL connection using TLS 1.2 by appending
Encrypt=Trueto the connection string and installing a server certificate. - Apply Windows file ACLs on the archive backup directory so only the SQL service account and the backup operator can read the .bak files.
- Configure audit logging on the SQL Server instance to record who queries the
ALGviewschema. - Enable Unified user administration in TIA Portal so the alarm grid control respects the operator role for time range and export operations.
FAQ
Why does my WinCC Unified alarm grid show no history after commissioning?
The Archive Manager service is not running or has not been bound to a SQL archive. Start the service "SIMATIC WinCC Unified Archive Manager" via services.msc and verify the archive configuration in TIA Portal under Runtime settings -> Alarms -> Archive.
Which SQL Server versions does WinCC Unified V19 support for alarm history?
Microsoft SQL Server 2019 (15.0.x) and SQL Server 2022 (16.0.x), Standard or Enterprise edition. SQL Server Express is not recommended for production alarm history due to the 10 GB database size limit.
Can a Unified Comfort Panel store alarm history locally without a PC archive?
Yes. Unified Comfort Panels with firmware V19 can store alarm history on a removable SD card or forward it to a central SQL archive via the Archive Manager running on a separate PC. Local SD-card storage has a capacity ceiling around 4 GB.
How long can the SQL archive retain alarms?
Retention is controlled by the segment timeout (default 30 days) configured in TIA Portal under Runtime settings -> Alarms -> Archive. Raise the timeout for audit-grade retention and coordinate it with your SQL backup retention policy.
Does the Archive Manager require an additional license?
The Archive Manager is included with the WinCC Unified Runtime V19 installer. The runtime archive feature itself is licensed through the same WinCC Unified HMI license used for the runtime (for example, 6AV2153-1xx series).