Configuring WinCC Tag Logging Fast and Slow Archive Folders

David Krause11 min read
SCADA ConfigurationSiemensTechnical Reference
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Configuring WinCC Tag Logging Fast and Slow Archive Folders in WinCC RT Professional

WinCC Runtime archives tag values into two parallel storage tiers: the Tag Logging Fast database and the Tag Logging Slow database. Even when every configured logging cycle is sub-minute and all tags appear to be written to the fast tier, both folders and their underlying SQL Server segments are still provisioned on disk. This is a deliberate design constraint, not a misconfiguration. The sections below explain the underlying architecture, the segment rules that govern both folders, and the exact runtime parameters that control their size and retention.

1. Tag Logging Architecture Overview

WinCC (TIA Portal V20 / WinCC RT Professional and WinCC V7.x) separates process value archiving into two distinct log types to balance acquisition resolution against long-term retention cost:

Table 1 — Fast vs. Slow Tag Logging Tiers
Property Tag Logging Fast Tag Logging Slow
Intended use High-resolution acquisition of rapidly changing process values Compressed long-term archival of trend values
Typical acquisition cycle 500 ms to 60 s 1 min to 1 day
Storage format SQL Server database (.mdf + .ldf) SQL Server database (.mdf + .ldf)
Default folder <Project>\Archive\TagLoggingFast <Project>\Archive\TagLoggingSlow
Default segment length 1 day (configurable) 1 week to 1 month (configurable)
Minimum number of segments 3 3

Both databases are created automatically the first time Runtime is started. The folder presence on disk is therefore not a reliable indicator of which tier your tags are actually using — only the segment content tells you that.

Important: The folders TagLoggingFast and TagLoggingSlow — and the SQL Server data files inside them — are always generated when Runtime is started with any archive configuration present. You cannot suppress the creation of the slow folder by configuring every tag with a sub-minute cycle.

2. Why Both Folders Always Appear

The WinCC archive subsystem instantiates the two database schemas as part of Runtime initialization. Once instantiated, the SQL Server service holds open file handles to *.mdf (primary data) and *.ldf (transaction log) pairs for both log types. Removing or renaming the slow folder while Runtime is active will cause the next tag-write attempt to fail and generate a database error in the WinCC diagnostics viewer.

Concretely, the slow folder is provisioned because:

  1. The archive configuration object in the TIA Portal project always carries both fast and slow log definitions, even when only fast is used.
  2. WinCC Runtime needs both schemas to exist so that operators can later re-assign tags to the slow tier without restarting the project.
  3. The SQL Server instance creates the file group and transaction log on first attach, regardless of whether rows are written.

If you are certain that no tag will ever log to the slow tier, the only practical control available is to minimize the disk footprint of the slow folder — not to eliminate it.

3. Segment Rules and the 3-Segment Minimum

Each WinCC archive database is partitioned into time-based segments. A segment is a self-contained slice of the SQL database that can be swapped out (backed up, archived to network storage, or deleted) without affecting the active Runtime. Two parameters govern each segment:

Table 2 — Segment Parameters
Parameter Meaning Typical Value
Segment time period Length of time a single segment covers 1 day (fast), 1 week (slow)
Number of segments How many segments are kept on disk simultaneously 3 minimum, 14 to 31 typical
Segment size hint Optional upper bound to force early segment rollover Disabled by default

WinCC enforces a hard minimum of 3 segments per log type. Even if you enter 1 or 2 in the project, Runtime will clamp the value to 3 at start-up. This is necessary because:

  • The current segment cannot be closed while Runtime is writing to it.
  • The previous segment may still be required for trend backfill queries that span the rollover boundary.
  • A third segment is needed for the swap-in/swap-out cycle used by the online backup mechanism.
Field note: The 3-segment minimum applies to each log type independently. Configuring fast to 3 segments and slow to 3 segments is the absolute lowest disk footprint WinCC Runtime will allow.

4. TIA Portal Configuration Path

In WinCC RT Professional (TIA Portal V17 to V20), the log sizes and segment parameters are defined under:

Runtime settings > Logging

Refer to the official TIA Portal documentation page Defining the Log Size and Segmentation (RT Professional) — TIA Portal V20 for the full dialog reference. The dialog exposes the following controls:

Table 3 — Logging Dialog Controls
Dialog Field Scope Notes
Fast data log — Time period of all segments Fast log Accepts 1 day minimum
Fast data log — Number of segments Fast log Clamped to ≥ 3
Slow data log — Time period of all segments Slow log Accepts 1 day minimum
Slow data log — Number of segments Slow log Clamped to ≥ 3
Log path (advanced) Both Override default <Project>\Archive path

4.1 Minimizing the Slow Folder

If you do not write any data to the slow tier, the .mdf file will remain at its initial allocation size (typically 8 MB for the primary data file plus 8 MB for the transaction log) and will not grow. The .ldf may grow slightly during the first attach and then stabilize. To keep the slow folder footprint at its theoretical minimum, configure the following in the Runtime settings > Logging dialog:

  1. Set Time period of all segments for the slow data log to 1 day.
  2. Leave Number of segments at the default (3) — it cannot be reduced further.
  3. Accept the default archive path, or relocate it to a small dedicated volume if you want to isolate the unused slow data from your fast tier.

With these settings, the slow folder will consume roughly 24 to 48 MB of disk space and no more, regardless of how long Runtime runs.

4.2 Recommended Sizing for a Production Slow Tier

If you do use the slow tier for long-term trend retention, the sizing rule of thumb is:

Slow footprint (MB) ≈ (Sum of slow-tag acquisition cycles per day / 86 400) × bytes per sample × days retained × 1.3

Where bytes per sample is typically 24 to 32 bytes (8-byte timestamp + 8-byte value + 8-byte quality + 8-byte tag ID overhead). For a 1 000-tag slow archive with a 1-minute cycle retained for 30 days, expect roughly 1.0 to 1.3 GB on disk.

5. SQL Server File Layout

Both WinCC archive databases are standard SQL Server (or SQL Server Express) databases. The *.mdf is the primary data file containing the compressed value tables, and the *.ldf is the transaction log used for rollback and online backup. The file naming convention is:

<ProjectPath>\Archive\TagLoggingFast\
    TagLoggingFast.mdf
    TagLoggingFast_log.ldf

<ProjectPath>\Archive\TagLoggingSlow\
    TagLoggingSlow.mdf
    TagLoggingSlow_log.ldf

Do not delete or move these files while the WinCC Runtime service is running. The SQL Server holds exclusive locks on the file handles. If you need to reclaim disk space, use the WinCC archive backup tool to export and remove the oldest closed segments, not the Windows file explorer.

Warning: Manual deletion of *.mdf or *.ldf files while Runtime is active will corrupt the archive database. Runtime will fail to start on the next reboot until the database is restored from backup or reinitialized.

6. How Tag Acquisition Cycle Maps to Log Type

The log type for a given tag is determined by the acquisition cycle configured on the tag's archive settings, not by the file path. A tag is routed to the fast tier if its cycle is in the fast-tier range, and to the slow tier otherwise. The default boundaries are:

Table 4 — Default Cycle Boundaries (V20 RT Professional)
Cycle Range Assigned Log Type
500 ms to < 1 min (configurable threshold) Tag Logging Fast
1 min and above Tag Logging Slow

The exact crossover threshold is project-specific and is set under Runtime settings > Logging > Boundary between fast and slow logging. If every tag in your project is set to a sub-minute cycle, all value rows will be written to the fast database, but the slow database schema and its three empty segments will still be created and remain on disk.

7. Runtime Diagnostics

To confirm which tier your tags are actually writing to, use the WinCC diagnostics tools:

  1. Open the WinCC Explorer on the Runtime server and navigate to Diagnostics > Archive.
  2. Check the Tag Logging Fast and Tag Logging Slow status tiles for write counters and last-write timestamps.
  3. Cross-reference the ApDiag.out log file (default location: <ProjectPath>\Archive) for any archive subsystem errors.

If Tag Logging Slow shows zero writes over a 24-hour observation window, you can safely apply the minimum-footprint configuration described in section 4.1 without affecting trend or alarm data.

8. Troubleshooting Matrix

Table 5 — Common Tag Logging Fast / Slow Issues
Symptom Likely Cause Resolution
Both TagLoggingFast and TagLoggingSlow folders visible even when only fast tags are configured Normal Runtime behavior — both schemas are always provisioned No action required; configure slow to minimum 3 × 1-day segments to control footprint
Slow folder grows to several GB despite no slow tags Tag mis-routed to slow tier; check acquisition cycle Edit tag archive settings and set cycle to < 1 min to force fast tier
Runtime fails to start with "Cannot attach database TagLoggingSlow.mdf" SQL Server service not running, or file permissions wrong on archive path Verify SQL Server (WinCC) service is started; grant the Runtime service account Full Control on the Archive folder
Segment count in project does not match Runtime (e.g., project says 1, Runtime creates 3) 3-segment hard minimum Increase project value to ≥ 3; this is by design and cannot be disabled
Old segments are not being removed from disk Archive backup not configured or path is read-only Configure archive backup path under Runtime settings > Archive Backup; verify write access
Trend curve shows gaps at segment boundaries Previous segment was removed before trend query completed Increase number of segments to retain at least 2 closed segments beyond the current one
Slow folder persists on a redundant server after project switchover WinCC archive replication not synchronized Enable redundant WinCC server pairing and verify Archive Synchronizer service is running

9. Performance Considerations

The fast tier is sized for high write throughput at the cost of compression ratio. The slow tier is sized for compression and long retention at the cost of write throughput. Mixing high-frequency tags into the slow tier is a common cause of archive backlogs and SQL Server transaction log growth.

Rule of thumb: keep the slow-tier tag count below 5 000 tags per WinCC server for a single-server deployment, and keep the fast-tier write rate below 5 000 samples per second sustained. Exceeding these values requires either segment size hints (to force earlier rollover) or a tiered archive strategy with an external historian.

10. Migration and Re-Initialization

If you need to reset the slow database to its initial empty state (for example, after a project clone in a test environment), the supported procedure is:

  1. Stop the WinCC Runtime service.
  2. Stop the SQL Server (WinCC) service.
  3. Delete the contents of <ProjectPath>\Archive\TagLoggingSlow.
  4. Start the SQL Server (WinCC) service.
  5. Start the WinCC Runtime service — the slow database will be re-created with 3 empty segments.

The same procedure applies to the fast folder, but only do this on a test system. Re-initializing the fast database on a production line destroys all retained trend data.

Field caveat: Some TIA Portal versions (V17, V18) cache the SQL Server login credentials in the project file. If the re-initialization fails with a login error, re-enter the WinCC archive service account credentials under Runtime settings > Services and recompile the Runtime before starting it again.

11. Key Constraints Summary

  • Both TagLoggingFast and TagLoggingSlow folders are always created when Runtime starts with archive configuration present.
  • Folder presence does not indicate which tier is in use; check the WinCC diagnostics view for write counters.
  • Each log type enforces a hard minimum of 3 segments.
  • Minimum practical slow-tier footprint is 3 × 1-day segments.
  • Do not delete *.mdf / *.ldf files while Runtime is active.
  • Tag routing is determined by acquisition cycle, not by folder structure.

FAQ

Why does the TagLoggingSlow folder exist when all my tags use a sub-minute cycle?

WinCC Runtime always provisions both fast and slow database schemas at start-up, regardless of which tier your tags actually use. Folder presence is determined by the archive subsystem initialization, not by tag assignment. The slow folder will not grow in this case, but it will remain on disk with 3 empty segments (minimum).

Can I disable the TagLoggingSlow folder entirely?

No. The WinCC archive configuration object always carries both log types, and the SQL Server attaches both databases on first start. You can minimize the slow folder to 3 × 1-day segments (the absolute minimum Runtime will allow), but you cannot suppress its creation.

How do I change the slow log segment period and segment count?

Open the WinCC RT Professional project in TIA Portal and navigate to Runtime settings > Logging. Set Time period of all segments for the slow data log to 1 day and leave Number of segments at the default value of 3. Recompile and restart Runtime for the change to take effect. See the Defining the Log Size and Segmentation (RT Professional) reference for the full dialog layout.

What is the minimum number of segments WinCC Runtime will accept?

Three segments per log type. WinCC Runtime clamps any value below 3 to 3 at start-up. This is required so that the current writing segment, the most recent closed segment, and the previous closed segment can all coexist for online backup and trend backfill queries.

How is a tag assigned to the fast or slow log type?

The assignment is based on the tag's configured acquisition cycle and the boundary defined under Runtime settings > Logging > Boundary between fast and slow logging. By default, cycles below 1 minute route to the fast tier and cycles of 1 minute or above route to the slow tier. Editing the cycle on a tag's archive settings changes the routing immediately on the next Runtime start.

Back to blog