Resolving Multiproject Archiving Failures and WinCC Database Locks in SIMATIC PCS 7
When archiving a SIMATIC PCS 7 multiproject fails in SIMATIC Manager with generic error messages or access violations, the primary root cause is an active Microsoft SQL Server file lock on the OS project's database files (.mdf and .ldf). Even when WinCC Runtime is stopped, background processes (such as CCProjectMgr.exe or sqlservr.exe) maintain exclusive locks if an OS project remains open in WinCC Explorer. To resolve this, open each OS project in WinCC Explorer, select 'File > Close Project', close WinCC Explorer completely, and execute Reset_WinCC.vbs if locks persist. Then re-attempt archiving via 'File > Archive' in SIMATIC Manager.
Table of Contents
- Executive Summary
- SIMATIC Manager Archiving Architecture and File Lock Mechanics
- Why WinCC SQL Server Handles Block ZIP Archiving
- Diagnostic Matrix for Common Archiving Failure Symptoms
- Step-by-Step Procedure to Unlock Projects and Archive Successfully
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Executive Summary
Regular project archiving via SIMATIC Manager (File > Archive...) is the mandatory backup standard across all SIMATIC PCS 7 automation lifecycles. However, engineers managing multi-station engineering projects (containing multiple S7 programs, safety controllers, and redundant OS servers) frequently report archiving aborts. The compression utility begins packing files, only to halt with an error dialog stating 'The archive could not be created' or 'Access denied'. While engineers often suspect corrupted project files or defective hard drives, the underlying cause is almost always an exclusive file handle lock held by the Microsoft SQL Server instance running WinCC. Releasing these database attachments allows the archiver to generate clean, complete .zip backups.
SIMATIC Manager Archiving Architecture and File Lock Mechanics
When archiving a multiproject in SIMATIC Manager:
- The built-in archiver (PKZip engine) traverses every subdirectory of the multiproject folder structure.
- It reads files sequentially: CFC chart files, symbol tables, SCL sources, and WinCC OS database folders.
- In WinCC OS folders, the project configuration resides inside Microsoft SQL Server files (
<ProjectName>.mdfand<ProjectName>.ldf). - If any operating system process holds an exclusive read/write lock on these binary database files, the archiver cannot open the file for compression and immediately terminates the entire archiving process.
Why WinCC SQL Server Handles Block ZIP Archiving
Microsoft SQL Server operates with high data integrity constraints:
- As long as a WinCC project is loaded in WinCC Explorer, the SQL Server service (
sqlservr.exeunder instanceWINCC) keeps the database mounted. - Even after closing Graphic Designer or deactivating Runtime, background processes (
CCProjectMgr.exe,CCExp.exe) keep the database attached to the SQL instance. - Selecting File > Close Project in WinCC Explorer issues a formal
sp_detach_dbcommand, releasing the file locks and allowing external zip utilities full read access.
Diagnostic Matrix for Common Archiving Failure Symptoms
The following table summarizes common archiving errors in SIMATIC PCS 7 and their resolutions:
*.mdf / *.ldf in OS folderReset_WinCC.vbs.C:\Temp..zip archive.zip file*.s7p cross-pointersStep-by-Step Procedure to Unlock Projects and Archive Successfully
Method 1: Cleanly Detaching OS Projects via WinCC Explorer
- Open SIMATIC Manager on the Engineering Station.
- Navigate to each OS project container in the Component View.
- Right-click the OS and select Open Object (opens WinCC Explorer).
- In WinCC Explorer, select File > Close Project from the menu bar.
- Close WinCC Explorer completely.
- Repeat this step for all OS Servers, OS Clients, and Maintenance Stations in the multiproject.
- Return to SIMATIC Manager, select File > Archive..., choose Multiprojects, and click OK.
Method 2: Forcing Database Release via Reset_WinCC.vbs
- If archiving still fails due to background SQL processes:
- Close SIMATIC Manager and all engineering applications.
- Open the Windows Run dialog (
Windows Key + R). - Enter:
cmdto open the command prompt. - Execute the Siemens database reset script:
Reset_WinCC.vbs(located inC:\Program Files (x86)\Siemens\WinCC\bin). - The script terminates all hanging WinCC background tasks and cleanly detaches locked SQL databases.
- Re-open SIMATIC Manager and execute File > Archive....
Verification
To verify that the project archive is complete and valid:
- Archive Size Check: Confirm that the resulting
.zipfile has a realistic size (typically 100 MB to 2 GB for full multiprojects). - Test Retrieval: Test the backup by selecting File > Retrieve... into a temporary directory (e.g.
C:\Test_Retrieve). - Integrity Validation: Confirm that the retrieved project opens with zero missing subproject warnings and all CFC charts and OS graphics load cleanly.
Limitations and Operational Precautions
- Never Archive via Windows Explorer: Do not use Windows Explorer or third-party tools (WinRAR, 7-Zip) to compress active project folders; internal database pointer integrity is only guaranteed when using SIMATIC Manager's native archiver.
- Do Not Reset_WinCC on Active Production Servers: Running
Reset_WinCC.vbson a live, running OS Server terminates active operator control and alarm logging; execute this utility only on the Engineering Station. - Destination Storage: Never archive directly to network drives or removable USB flash drives with slow write caches; archive to local high-speed SSD storage first, then copy the completed
.zipfile.
Engineer FAQ
Can I exclude historical trend archives from the project backup to reduce file size?
Yes, in WinCC Explorer Tag Logging / Alarm Logging properties, archives can be detached or stored in separate backup paths before archiving.
Why does SIMATIC Manager create a .zip file instead of .arj in modern versions?
Modern PCS 7 versions standardize on standard PKZip compression; older V5/V6 versions historically utilized the ARJ compression format.
Does archiving a project create a CPU download timestamp discrepancy?
No. Archiving is a passive file read operation that has zero impact on offline or online controller compilation timestamps.
Technical References
- Siemens Industry Online Support Entry ID 67598869: How Do You Archive/Retrieve a SIMATIC PCS 7 Project?
- Siemens AG: SIMATIC STEP 7 V5.6 Managing Projects and Multiprojects (Doc No. A5E41221568)
- Siemens Industry Online Support Entry ID 109780813: WinCC Database Detachment and Archiving Guidelines
Related Articles
- https://industrialautomation.net/search?query=simatic+manager+archiving+error+access+denied+fix
- https://industrialautomation.net/search?query=reset_wincc.vbs+usage+and+database+detachment
- https://industrialautomation.net/search?query=pcs7+multiproject+backup+best+practices
Related Tags
- https://industrialautomation.net/search?query=simatic-pcs7
- https://industrialautomation.net/search?query=archiving
- https://industrialautomation.net/search?query=backup
- https://industrialautomation.net/search?query=wincc