Resolving Multiproject Archiving Failures and File Lock Conflicts in SIMATIC PCS 7

Resolving Multiproject Archiving Failures and File Lock Conflicts in SIMATIC PCS 7

SIMATIC PCS 7 multiproject archiving fails when underlying WinCC database files or engineering background processes maintain exclusive Windows file locks on the project directory. The internal PKZIP archiving engine in SIMATIC Manager requires unshared read access to all component databases and charts. To resolve lockouts, close all open editors on all engineering stations, terminate lingering WinCC background processes using the reset_wincc script, verify that SQL Server database attachments have detached cleanly, and ensure no remote network sessions hold file handles before initiating the archive operation.

Table of Contents

Root Causes of Multiproject Archiving Failures

When invoking File -> Archive from SIMATIC Manager, the integrated archiving tool (PKZIP or internal archiving engine) compresses all automation station (AS) subprojects, operator station (OS) WinCC projects, SIMATIC BATCH directories, and shared network library components into a single .zip archive file. This compression routine requires exclusive, unshared file read access across all project directories. Archiving aborts immediately with an error indicating that project files are in use or locked when any of the following conditions occur:

  1. Active WinCC Background Daemons: Even after closing WinCC Explorer, background subsystems such as CCProjectMgr.exe, pdlrt.exe, CCEmergencyStore.exe, or CCDataStore.exe may remain resident in memory, maintaining active file locks on .mdf and .ldf database files.
  2. Persistent SQL Server Instance Attachments: The local SQL Server (WINCC) instance holds exclusive lock handles on runtime and configuration databases if the project was not cleanly closed from the WinCC graphical interface.
  3. Orphaned Network Sessions: In distributed multi-user engineering environments where subprojects reside on a central Engineering Station (ES) or server, remote clients may hold lingering SMB file handles across network shares (_PRJ).
  4. Active Engineering Applications: Open instances of Continuous Function Chart (CFC), Sequential Function Chart (SFC), HW Config, SIMATIC PDM, or S7-PLCSIM lock underlying database tables in the project tree.

Step-by-Step Archive Recovery and Unlock Procedure

To release all file handles and successfully execute a multiproject archive, follow this sequential engineering workflow:

Step 1: Clean Application Shutdown

  1. Within SIMATIC Manager, close all open sub-editors across all automation stations, including HW Config, NetPro, CFC, SFC, and Symbol Tables.
  2. If any WinCC OS project is open, select File -> Close in WinCC Explorer. Never terminate WinCC Explorer via Windows Task Manager while a project is loading or closing.
  3. Close SIMATIC Manager.

Step 2: Execute the WinCC Process Reset Utility

  1. Open the Windows Run dialog (Windows Key + R).
  2. Type reset_wincc.vbs and press Enter, or navigate to C:\Program Files (x86)\Siemens\WinCC\bin\reset_wincc.vbs in an administrative command prompt.
  3. A command console window appears and iterates through all active WinCC processes, detaching project databases and terminating hung runtime daemons.
  4. Wait until the script finishes and the console window closes automatically.

Step 3: Clear Dangling Windows Temp Files

  1. Navigate to the Windows temporary directories:
    * %TEMP%
    * C:\Windows\Temp
  2. Remove orphaned temporary files (*.tmp) and lingering archive temporary folders created during previous aborted PKZIP routines.

Step 4: Initiate SIMATIC Manager Archive

  1. Launch SIMATIC Manager using Run as administrator.
  2. Select File -> Archive.
  3. In the Archive dialog, select the Multiproject tab, choose the target project, and define the destination directory on a local drive with sufficient free storage.
  4. Verify that the compression process completes without error and generates a valid .zip archive.

Managing SQL Server Service and Process States

If reset_wincc.vbs fails to release the locked .mdf and .ldf files in the OS project directory, manual intervention with the Microsoft SQL Server service is necessary:

  1. Open Windows Computer Management (compmgmt.msc) or open SQL Server Configuration Manager from the Start menu.
  2. In the left navigation tree, select SQL Server Services.
  3. Locate the service instance named SQL Server (WINCC).
  4. Right-click SQL Server (WINCC) and select Stop. Stopping this service terminates all database engine file handles across all local WinCC projects.
  5. In SIMATIC Manager, execute the archive operation while the database service is stopped.
  6. Once the archive completes, right-click SQL Server (WINCC) in SQL Server Configuration Manager and select Start. Set its Startup Type back to Automatic.
  7. Alternatively, perform a full operating system restart to clear corrupted operating system handle tables.

Multi-Station Network Share and Handle Verification

In distributed engineering environments, an archive failure on the central ES is frequently caused by remote client engineering workstations holding open file handles across the network:

  1. On the Central ES hosting the project files, open Computer Management (compmgmt.msc).
  2. Navigate to System Tools -> Shared Folders -> Open Files.
  3. Review the list of open files for paths pointing inside the multiproject folder. Note the client IP address and username holding the lock.
  4. If the remote engineer has already closed their editors, right-click the lingering file handles and select Close Open File, or disconnect the remote session under Shared Folders -> Sessions.
  5. Ensure that network shares hosting the multiproject are configured with full permissions for the SIMATIC HMI and SIMATIC NET user groups.

Verification

Following the creation of the archive file, verify its technical validity before using it as a plant baseline or backup:

  1. File Size Check: Confirm that the generated .zip file size matches expectations (typically 500 MB to several gigabytes depending on OS project graphics and tag logging databases).
  2. Retrieval Verification:
    * Open SIMATIC Manager.
    * Select File -> Retrieve.
    * Point to the newly created archive and extract it into a test destination directory (e.g., D:\Test_Restore\).
  3. Consistency Check:
    * Open the retrieved multiproject in SIMATIC Manager.
    * Right-click the Multiproject root and select Multiproject -> Reorganize.
    * Open one AS CFC chart and one OS WinCC project to ensure database consistency and confirm that no tables are marked corrupted.
    * Delete the temporary extraction directory once verification is complete.

Limitations and Operational Precautions

  • Never Archive During AS/OS Compilations: Archiving while an AS compile, OS compile, or target download is executing will corrupt the archive and can damage active engineering databases.
  • Avoid Network Drive Archive Destinations: Directly saving the archive .zip file across an unstable network share or VPN tunnel can produce truncated archive files. Always archive to a local hard drive first, then transfer the compressed .zip across the network.
  • WinCC Runtime Restriction: Never attempt to archive a multiproject while an OS project is actively running in WinCC Runtime on the engineering station. Deactivate runtime fully before archiving.
  • Third-Party Archive Tools: Do not use generic compression utilities (such as 7-Zip or WinRAR) to directly compress a live multiproject folder. The internal SIMATIC Manager archiver includes proprietary database consistency checks and stripping of ephemeral working files that third-party tools bypass.

Engineer FAQ

  • Why does SIMATIC Manager report that the project is still accessed by another application?
    Background processes such as CCProjectMgr.exe, pdlrt.exe, or SQL Server (WINCC) remain active in memory and retain open file handles on database files.
  • Is it safe to stop the SQL Server (WINCC) service while SIMATIC Manager is running?
    Stopping SQL Server (WINCC) is safe only when all WinCC projects are closed. If an OS project is open, stopping SQL Server crashes WinCC Explorer.
  • Can I use 7-Zip or WinRAR instead of SIMATIC Manager's built-in archive function?
    Using external zip utilities on active project folders is not recommended because they cannot verify database detachment and may fail on locked files.
  • What does reset_wincc.vbs actually do under the hood?
    The script terminates active WinCC runtime and communication processes, disconnects open SQL Server connections, and clears dangling handles.
  • How can I identify which specific file is locked in a large PCS 7 multiproject?
    Open Windows Computer Management (compmgmt.msc) and inspect Shared Folders -> Open Files, or use Sysinternals Handle on the server.
  • Does archiving a multiproject include the archive databases of WinCC Tag Logging and Alarm Logging?
    Standard archiving includes project structure and configuration databases, but historically detached Tag Logging and Alarm Logging segment archives should be detached first.
  • Why does the archive process abort at 99% completion?
    Late-stage aborts usually occur when PKZIP attempts to compress the final master multiproject index file while a background handle still holds it, or when disk space runs out.
  • Can multi-user engineering cause archive lockouts even if all engineers are logged off?
    Yes, if an engineering workstation disconnected abruptly while a chart was open, the server SMB daemon may hold open file locks for hours.
  • What is the function of 'Reorganize' in SIMATIC Manager prior to archiving?
    Selecting File -> Reorganize cleans up deleted database records, removes orphaned block pointers, and compresses the internal project database.
  • Does SIMATIC PCS 7 support archiving projects larger than 4 GB?
    Modern PCS 7 versions utilize an updated archiving engine that supports Zip64 standards, removing historical 4 GB PKZIP file size limitations.

Technical References

  • Siemens Industry Online Support (SIOS) Portal: What should you watch out for when archiving and retrieving PCS 7 projects? (Entry ID: 22261432).
  • SIMATIC PCS 7 Engineering System Manual (V8.2 / V9.0 / V9.1), Siemens AG.
  • Microsoft Technical Documentation: Managing Open Files and Shared Folders in Windows Server.

Related Articles

Related Tags

PCS 7, SIMATIC Manager, WinCC, Multiproject, Archiving, SQL Server, Troubleshooting, Multi-User Engineering

20 respuestas