Resolving CCMigrator Errors During WinCC OS Project Migration in SIMATIC PCS 7

Resolving CCMigrator Errors During WinCC OS Project Migration in SIMATIC PCS 7

To resolve CCMigrator errors ('Migration is finished. Error occurred during the migration') when upgrading a WinCC OS project from PCS 7 V7.1 SP2 to V7.1 SP3 or newer, review the detailed migration log file (_Migration.log located in the project root directory) to identify the failing component. Common causes include active database locks, read-only file attributes inherited from unzipping archives, insufficient Windows user permissions, or orphaned SQL Server database attachments. Resolve these by running 'Reset_WinCC.vbs' in an elevated Command Prompt, removing read-only attributes from all project files and subfolders, verifying that the current Windows user is in the 'SIMATIC HMI' group, and ensuring the SQL Server WinCC instance is fully operational before executing CCMigrator.

Table of Contents

Executive Summary

Migrating SIMATIC PCS 7 WinCC Operator Stations between software service packs or major versions is a critical lifecycle task that updates SQL Server database schemas, runtime configuration tables, C and VBScript libraries, and Graphics Designer .pdl screens. The migration engine, executed via CCMigrator.exe (WinCC Project Migrator), handles these transformations automatically. However, when migrating projects—such as updating from PCS 7 V7.1 SP2 to V7.1 SP3—engineers frequently encounter the generic error prompt: 'Migration is finished. Error occurred during the migration.'

Because this high-level notification provides no diagnostic details, troubleshooting requires analyzing the internal migration log files. Most migration failures stem from file system locks, permission mismatches, corrupted SQL database attachments, or unclosed background processes lingering from prior sessions. This technical guide outlines the internal mechanics of the WinCC migration engine, provides a step-by-step recovery and migration procedure, details the mandatory Windows administrative prerequisites, and explains how to verify complete project consistency prior to downloading to redundant OS servers.

Architecture and Fundamental Mechanics

The WinCC Project Migrator (CCMigrator.exe) performs a sequential multi-stage transformation on the target WinCC project:
1. Environment and Permission Verification: Checks that the local Windows user belongs to the local SIMATIC HMI and Administrators security groups, and confirms that Microsoft SQL Server (instance WinCC) is active and reachable via local named pipes.
2. Database Detachment and Copy: The migrator attaches the project's primary configuration database (<ProjectName>.mdf and <ProjectName>.ldf) to the local SQL Server instance. If the database was copied from read-only media or locked by another process (such as an unclosed CCProjectMgr.exe), SQL Server aborts with error 5120 ('Unable to open the physical file').
3. Schema Transformation: SQL scripts execute against the database to upgrade system tables, alarm configurations, and tag management structures to match the target WinCC version schema. Syntax or constraint failures during schema alteration trigger immediate rollback and append error entries to the log.
4. Graphics and Script Compilation: The migrator converts .pdl picture files to the updated binary format and verifies project C-scripts (Library, Actions) and Visual Basic scripts. Syntax errors in custom C-scripts can cause warnings or non-fatal errors, but corrupted binary headers cause migration aborts.
5. Logging: The entire transaction history is recorded in <ProjectDirectory>\<ProjectName>_Migration.log and the system migration log CCMigrator.log located under C:\Program Files (x86)\Siemens\WinCC\Diagnostics\.

Step-by-Step Implementation Procedure

Step 1: Analyze the Migration Diagnostic Log

  1. Navigate to the root directory of the WinCC OS project being migrated.
  2. Locate and open the file <ProjectName>_Migration.log using a text editor.
  3. Scroll to the bottom of the log or search for keywords ERROR, FAILED, or HR = 0x8.
  4. Note the specific phase that failed (e.g., SQL Server database attach, Table Alteration, or PDL conversion).

Step 2: Terminate Lingering WinCC Processes and Reset Environment

  1. Close SIMATIC Manager and all open WinCC applications.
  2. Open an elevated Windows Command Prompt (Run as administrator).
  3. Execute the WinCC reset utility to terminate all background database and communication services:
    cmd cd "C:\Program Files (x86)\Siemens\WinCC\bin" Reset_WinCC.vbs
  4. Wait until the command prompt returns and confirm in Windows Task Manager that no instances of CCProjectMgr.exe, CCMigrator.exe, or sqlservr.exe (WinCC instance) are locked.

Step 3: Remove Read-Only Attributes Across the Entire Project Folder

  1. In Windows Explorer, right-click the root folder of the PCS 7 / WinCC project and select Properties.
  2. On the General tab, clear the Read-only checkbox.
  3. Click Apply, select 'Apply changes to this folder, subfolders and files', and click OK.

Step 4: Verify Local Windows Security Group Memberships

  1. Open Computer Management (compmgmt.msc) on the engineering station.
  2. Navigate to Local Users and Groups > Groups.
  3. Verify that your current Windows logon account is an explicit member of:
    * SIMATIC HMI
    * SIMATIC NET
    * Administrators
  4. If memberships were added, log off and log back into Windows to apply the updated security token.

Step 5: Execute Migration in Standalone Migrator

  1. Open Windows Start menu and navigate to Siemens Automation > SIMATIC > WinCC > Tools > Project Migrator.
  2. Run CCMigrator.exe as Administrator.
  3. Browse to the <ProjectName>.mcp project file located on a local high-speed drive (never migrate across network shares).
  4. Start the migration process and allow it to run to completion without interruption.

Verification

  1. Verify that CCMigrator.exe displays the success message: 'Migration completed successfully'.
  2. Open <ProjectName>_Migration.log and verify that the exit code is 0 with zero recorded fatal errors.
  3. Open the migrated project in SIMATIC Manager and double-click the OS station to launch WinCC Explorer.
  4. Verify that WinCC Explorer opens without database connection prompts or error dialogs.
  5. In WinCC Explorer, verify that Tag Management, Alarm Logging, and Graphics Designer open smoothly and display all expected tags and pictures.
  6. Perform an OS Compile ('Changes only') from SIMATIC Manager to confirm complete AS-OS synchronization.

Limitations and Operational Precautions

  1. Upgraded WinCC projects are irreversibly modified; a project migrated to a newer version or service pack cannot be opened or restored in earlier PCS 7 versions. Always archive a complete project backup prior to migration.
  2. Never execute CCMigrator.exe on projects stored on mapped network drives, USB flash drives, or cloud-synced folders (OneDrive/Dropbox); migration must occur strictly on a local NTFS partition.
  3. If migrating across major versions (e.g., V7.1 to V8.2 or V9.0), intermediate migration steps may be required by Siemens migration documentation.
  4. Custom C-scripts using obsolete or discontinued WinCC internal APIs will trigger compiler warnings and may require manual refactoring.

Engineer FAQ

Can I revert a migrated project back to PCS 7 V7.1 SP2 after migrating to SP3?

No. The SQL Server schema modifications are permanent and cannot be downgraded. You must restore your pre-migration project backup if you need to run on V7.1 SP2.

Why does CCMigrator fail when the project is on a network drive?

Microsoft SQL Server cannot reliably attach database files (.mdf/.ldf) across SMB network shares without enterprise network share configurations that WinCC does not support. Always migrate on local storage.

What should I do if the migration log reports Error 5120 during database attach?

Error 5120 indicates an operating system file permission error. Ensure that the SQL Server service account (NT SERVICE\MSSQL$WINCC) or the SIMATIC HMI group has full control permissions on the project folder.

Does migrating the OS project require upgrading the AS controller program?

Upgrading an OS service pack (e.g., V7.1 SP2 to SP3) does not strictly require an AS stop, provided the AS library blocks remain compatible. However, an OS compile is required to align tag databases.

Do I need new licenses to migrate from PCS 7 V7.1 SP2 to SP3?

Service pack updates within the same major release (V7.1) generally utilize the existing license keys. Major version upgrades (e.g., V7.1 to V8.x or V9.x) require upgrade license packages. Verify licensing entitlements with an authorized Siemens distributor or the Siemens Industry Mall.

Technical References

Related Articles

Related Tags

  • WinCC Migration
  • CCMigrator
  • PCS 7 V7.1
  • SQL Server
  • OS Upgrade
20 respuestas