Reducing Excessive Multiproject Archive File Sizes and Compacting Databases in PCS 7

Reducing Excessive Multiproject Archive File Sizes and Compacting Databases in PCS 7

In SIMATIC PCS 7, an excessively large project archive file (exceeding 6 GB to 10 GB) produced by SIMATIC Manager (File -> Archive) occurs because the archive inadvertently captures massive WinCC historical process data, temporary runtime SQL databases, or bloated graphic directories. In operating plants, the WinCC OS project directory often contains the ArchiveManager folder with gigabytes of historical tag and alarm segments, temporary runtime database files (R.mdf and R.ldf), and uncompressed project bitmaps in GraCS. To reduce the archive size to standard engineering dimensions (typically 200 MB to 800 MB), exclude or back up ArchiveManager separately, delete temporary runtime databases, and perform 'Save As with Reorganization (Slow)' in SIMATIC Manager.

Table of Contents

PCS 7 Multiproject Directory Structure and Storage Consumption

A SIMATIC PCS 7 automation system is encapsulated within a Multiproject (.s7m) containing multiple nested directories: one or more S7-400 automation station projects (.s7p), the Master Data Library, and operator station projects (.mcp). Under standard engineering conditions, an entire DCS engineering configuration (hundreds of CFC charts, SFC types, hardware definitions, and WinCC screens) occupies between 300 MB and 1.5 GB uncompressed.

When an engineer invokes File -> Archive in SIMATIC Manager, the archiving engine recursively packages every file and folder located under the project root paths. If runtime data buffers, SQL transaction logs, and historical archives are allowed to accumulate inside these project folders, the resulting archive balloons to massive proportions (6 GB to 20 GB), leading to storage exhaustion, slow network transfers, and archive corruption risks.

Root Causes of Multi-Gigabyte Archive Expansion

Technical investigation into bloated PCS 7 project archives reveals four primary culprits:

  1. Inclusion of WinCC Historical Process Archives (ArchiveManager): In WinCC OS projects, historical process values and alarm logs are stored in the ArchiveManager folder (TagExport, AlarmLogging, TagLoggingFast, TagLoggingSlow). In operating plants, this folder accumulates dozens of gigabytes of SQL database segments (*.mdf / *.ldf). These runtime archives belong in Process Historian or long-term backup shares, not within engineering code backups.

  2. Temporary Runtime Database Files (*R.mdf and *R.ldf): When WinCC Runtime is active, SQL Server generates temporary runtime mirror databases ending in R.mdf and R.ldf. Archiving without closing WinCC captures these locked, multi-gigabyte temporary files.

  3. Database Fragmentation and Deleted Object Bloat: Continuous editing of CFC charts, deleting blocks, and recompiling leaves fragmented database records inside STEP 7's internal database files (ombstx, hwsx). Standard saving does not release this deleted space.

  4. Uncompressed Graphic Media in GraCS: Placing uncompressed bitmaps (.bmp), high-resolution camera images, or PDF manuals directly into the WinCC GraCS directory inflates the graphic repository.

Project Folder Components and Archiving Exclusion Matrix

The following table details project folder components, typical size footprints, and cleanup actions prior to archiving:

Directory / File PatternPurpose / ContentNormal FootprintBloated FootprintRemediation Action<OS_Project>\ArchiveManagerWinCC Runtime Trend & Alarm Logs0 MB (Clean ES)5 GB to 50+ GBExclude / Back up separately<ProjectName>R.mdf / .ldfTemporary WinCC Runtime DB0 MB (Runtime off)1 GB to 5 GBDelete temporary files when runtime stopped<OS_Project>\GraCSWinCC Pictures, Faceplates & C-Scripts50 MB to 200 MB2 GB to 5 GBConvert BMPs to PNG; remove external PDFs<AS_Project>\ombstxSTEP 7 Internal CFC & Symbol DB50 MB to 150 MB500 MB to 2 GBExecute 'Save As with Reorganization'<OS_Project>\PackagesGenerated OS Server Data Packages5 MB to 20 MB100 MBRe-generate clean server data*.bak / *.tmp / *.dmpOld backup files & crash dumps0 MBHundreds of MBDelete prior to archiving

Step-by-Step Procedure to Clean, Compact, and Shrink Multiprojects

To reduce an oversized PCS 7 multiproject archive to standard engineering dimensions:

  1. Deactivate Runtime and Close WinCC Explorer:
    - On all OS servers and engineering stations, deactivate WinCC Runtime (Deactivate).
    - Verify in Windows Task Manager that CCRtSys.exe is terminated.
    - Close WinCC Explorer completely to release Microsoft SQL Server file locks.

  2. Purge Temporary Runtime Files and ArchiveManager Segments:
    - Open Windows Explorer and navigate to each WinCC OS project directory.
    - Open the ArchiveManager folder.
    - If historical process data must be retained, copy the contents of ArchiveManager to a separate external backup drive.
    - Delete the historical segment files (.mdf and .ldf) from ArchiveManager\TagLoggingFast, TagLoggingSlow, and AlarmLogging.
    - In the root of the OS project folder, delete any files matching <ProjectName>R.mdf and <ProjectName>R.ldf.

  3. Audit and Clean the GraCS Directory:
    - Open the GraCS folder in the OS project.
    - Search for oversized files (> 10 MB) such as .avi, .pdf, or uncompressed .bmp files.
    - Remove non-essential files and convert background graphics to .png or .jpg.

  4. Perform 'Save As with Reorganization (Slow)' in SIMATIC Manager:
    - Launch SIMATIC Manager and open the Multiproject.
    - Close all open CFC charts, SFC editors, and HW Config windows.
    - Select File -> Save As....
    - In the Save As dialog, check the box With reorganization (slow).
    - Specify a new project destination path (e.g., D:\PCS7_Projects\Compacted_Project\).
    - Click OK. SIMATIC Manager reorganizes the relational databases, purges all deleted block fragments, and rebuilds database indices.

  5. Execute Fresh SIMATIC Manager Archive:
    - Open the newly reorganized multiproject.
    - Select File -> Archive.
    - Select target local drive and create the .zip archive.
    - Confirm that the resulting archive file size drops from 6 GB+ down to a manageable 300 MB to 800 MB.

Verification

Verify project integrity and archive reduction:
1. Check the newly generated archive in Windows Explorer; confirm that file size is comfortably under 1 GB.
2. In SIMATIC Manager, select File -> Retrieve into a test folder.
3. Confirm that the retrieved project opens cleanly without database mismatch warnings.
4. Open CFC and WinCC Explorer in the retrieved project; verify that all charts, tags, and graphics remain 100% intact.

Limitations and Operational Precautions

  • Historical Data Retention: Deleting files in ArchiveManager permanently removes on-screen historical trend history on that local station. Ensure historical data is backed up before deletion.
  • Never Delete Primary SQL Files: Never delete <ProjectName>.mdf or <ProjectName>.ldf (without the 'R' suffix); these files contain the primary WinCC project configuration.
  • Disk Space During Reorganization: Executing 'Save As with Reorganization' requires free disk space equal to at least twice the original project size during processing.

Engineer FAQ

Why is my PCS 7 project archive over 6 GB?

The archive is almost certainly capturing the WinCC ArchiveManager directory (historical process trends and alarms) or temporary runtime database files (*R.mdf).

What does 'Save As with Reorganization (Slow)' do?

It defragments the project databases, removes deleted blocks and pointer fragments, and rebuilds database indices, significantly shrinking the project footprint.

Is it safe to delete files inside the ArchiveManager folder?

Yes, provided you do not need historical trend data in your engineering code backup. The engineering configuration resides in the master project database, not in ArchiveManager.

Can I delete files ending in R.mdf?

Yes. Files matching R.mdf and R.ldf are temporary runtime cache files created when WinCC Runtime starts and are safe to delete when runtime is stopped.

Technical References

Related Articles

Related Tags

  • SIMATIC Archive
  • ArchiveManager
  • Project Size
  • Save As Reorganization
  • WinCC SQL Database
  • Disk Cleanup
6 respuestas