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
- Root Causes of Multi-Gigabyte Archive Expansion
- Project Folder Components and Archiving Exclusion Matrix
- Step-by-Step Procedure to Clean, Compact, and Shrink Multiprojects
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
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:
-
Inclusion of WinCC Historical Process Archives (
ArchiveManager): In WinCC OS projects, historical process values and alarm logs are stored in theArchiveManagerfolder (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. -
Temporary Runtime Database Files (
*R.mdfand*R.ldf): When WinCC Runtime is active, SQL Server generates temporary runtime mirror databases ending inR.mdfandR.ldf. Archiving without closing WinCC captures these locked, multi-gigabyte temporary files. -
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. -
Uncompressed Graphic Media in
GraCS: Placing uncompressed bitmaps (.bmp), high-resolution camera images, or PDF manuals directly into the WinCCGraCSdirectory 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:
<OS_Project>\ArchiveManager<ProjectName>R.mdf / .ldf<OS_Project>\GraCS<AS_Project>\ombstx<OS_Project>\Packages*.bak / *.tmp / *.dmpStep-by-Step Procedure to Clean, Compact, and Shrink Multiprojects
To reduce an oversized PCS 7 multiproject archive to standard engineering dimensions:
-
Deactivate Runtime and Close WinCC Explorer:
- On all OS servers and engineering stations, deactivate WinCC Runtime (Deactivate).
- Verify in Windows Task Manager thatCCRtSys.exeis terminated.
- Close WinCC Explorer completely to release Microsoft SQL Server file locks. -
Purge Temporary Runtime Files and ArchiveManager Segments:
- Open Windows Explorer and navigate to each WinCC OS project directory.
- Open theArchiveManagerfolder.
- If historical process data must be retained, copy the contents ofArchiveManagerto a separate external backup drive.
- Delete the historical segment files (.mdfand.ldf) fromArchiveManager\TagLoggingFast,TagLoggingSlow, andAlarmLogging.
- In the root of the OS project folder, delete any files matching<ProjectName>R.mdfand<ProjectName>R.ldf. -
Audit and Clean the
GraCSDirectory:
- Open theGraCSfolder in the OS project.
- Search for oversized files (> 10 MB) such as.avi,.pdf, or uncompressed.bmpfiles.
- Remove non-essential files and convert background graphics to.pngor.jpg. -
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. -
Execute Fresh SIMATIC Manager Archive:
- Open the newly reorganized multiproject.
- Select File -> Archive.
- Select target local drive and create the.ziparchive.
- 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
ArchiveManagerpermanently 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>.mdfor<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
- SIMATIC PCS 7 Engineering System Compendium Part A (A5E39144865-AB)
- SIMATIC HMI WinCC V7.4 System Manual (A5E37536408-AA)
- Siemens Industry Online Support: Managing Project Archive Sizes in PCS 7 (Entry ID: 109780813)
Related Articles
- Best Practices for Archiving SIMATIC PCS 7 Multiprojects Without Database Corruption
- Managing Database Growth and Sizing for the SIMATIC BATCH sbdata Directory
- Managing SQL Server MSDBData.mdf Growth and Backup History in SIMATIC Process Historian
Related Tags
- SIMATIC Archive
- ArchiveManager
- Project Size
- Save As Reorganization
- WinCC SQL Database
- Disk Cleanup