Resolving 'Error Copying Project Data to Destination' During OS Server Download in SIMATIC PCS 7
In SIMATIC PCS 7, 'Error copying the project data to the destination system' during OS download occurs when Microsoft SQL Server on the target OS Server holds an exclusive file lock on the transaction log (OSAS.ldf) or database file (OSAS.mdf). Resolve this by deactivating WinCC Runtime on the OS Server, restarting the SQL Server (WINCC) service, verifying Full Control share permissions for SIMATIC HMI, and performing an Entire Project Download.
Table of Contents
- Diagnostic Overview and SQL File Lock Symptoms
- Root Cause Analysis: File Sharing vs. Exclusive Database Locks
- Step-by-Step Resolution and Clean Deployment Workflow
- OS Download Failure Checklist and Troubleshooting Matrix
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Diagnostic Overview and SQL File Lock Symptoms
During commissioning or site updates in SIMATIC PCS 7, an automation engineer compiles process graphics, alarm modifications, and tag updates on the Engineering Station (ES) and executes the Download OS command in SIMATIC Manager.
The deployment process halts with an unexpected file system error:
* The ES begins copying project files across the Windows SMB network share to the remote OS Server.
* During the file transfer, the download aborts with a red modal error dialog:
Error copying the project data to the destination system.
* Inspection of the detailed error log or file paths reveals that the file causing the collision is the database transaction log file: OSName.ldf (or database primary file OSName.mdf).
* The engineer inspects the target folder and sees that while OSName.mcp and graphic files exist, the .ldf file cannot be replaced, renamed, or deleted.
Because the ES cannot overwrite the target .ldf file, the download terminates, leaving the OS Server in an inconsistent state where new graphics and tags cannot be activated.
Root Cause Analysis: File Sharing vs. Exclusive Database Locks
Understanding why the .ldf file cannot be copied requires examining how Microsoft SQL Server interacts with the Windows operating system:
-
Exclusive Operating System File Locks by SQL Server:
* SIMATIC WinCC relies on Microsoft SQL Server to manage tag logging, alarm logging, and configuration databases (OSName.mdfandOSName.ldf).
* When WinCC Explorer or WinCC Runtime opens a project, the SQL Server service attaches the database and places an exclusive operating system lock on both.mdfand.ldffiles.
* As long as the database is mounted, Windows prohibits any other process—including the network copy routine executed by SIMATIC Manager—from modifying, overwriting, or deleting those files. -
Unclean WinCC Runtime Deactivation:
* If WinCC Runtime was closed abruptly, if background processes (such asCCArchiveManager.exeorCCProjectMgr.exe) hung in the background, or if a local client session remained open, SQL Server does not detach the database.
* When the ES attempts to overwriteOSName.ldf, Windows returns aSharing Violation (ERROR_SHARING_VIOLATION 0x20)error, aborting the download. -
Target Folder Share Permissions and Network Credentials:
* The destination folder on the OS Server must be shared across the network with Full Control permissions granted to theSIMATIC HMIgroup and the logged-in administrative user.
Step-by-Step Resolution and Clean Deployment Workflow
1. Fully Deactivate WinCC on the Target OS Server
- On the OS Server, if WinCC Runtime is active, click the Deactivate button.
- Wait for all runtime processes to shut down cleanly.
- Close WinCC Explorer completely.
2. Release Lingering Database Locks via SQL Server Restart
- On the OS Server, open Windows Services (
services.msc). - Locate the service SQL Server (WINCC).
- Right-click the service and select Restart.
- Restarting the service forces SQL Server to close all active handles and detach unmounted databases, releasing the lock on
OSAS.ldf. - In Windows Task Manager, verify that no orphaned WinCC processes (
CCProjectMgr.exe,CCArchiveManager.exe,CCAgent.exe) are running.
3. Verify Target Directory Share Permissions
- On the OS Server, locate the target project directory (e.g.
D:\WinCC_Projects\OS_Server). - Right-click the folder, select Properties > Sharing > Advanced Sharing:
* Confirm the folder is shared (e.g. share nameOS_Server).
* In Permissions, confirm thatEveryone,Administrators, andSIMATIC HMIhave Full Control. - In the Security tab, verify NTFS permissions also grant Full Control to
SIMATIC HMI.
4. Delete and Recreate the Target Project Folder (If Corruption Persists)
If file locks or corrupted segment links persist:
1. Stop the SQL Server (WINCC) service.
2. Rename or delete the entire target project folder on the OS Server.
3. Create a clean, empty folder with the identical name and apply full share permissions.
4. Restart the SQL Server (WINCC) service.
5. Execute an Entire Project Download from the ES
- On the Engineering Station, open SIMATIC Manager.
- Right-click the OS Server object and select PLC > Download.
- Select Scope: Entire Project.
- Confirm the ES copies all database files, registers the new
.mdf/.ldffiles cleanly, and opens the project on the destination system without error.
OS Download Failure Checklist and Troubleshooting Matrix
OSAS.ldf locked by SQL ServerError copying project dataSIMATIC HMIVerification
- On the Engineering Station, execute PLC > Download to the OS Server.
- Confirm the file copy progress bar completes 100% without error dialogs.
- Confirm the status message transitions from 'Copying files...' to
Download finished successfully. - On the OS Server, confirm WinCC Explorer opens the newly downloaded project automatically.
- Activate WinCC Runtime; verify that all newly modified graphics and alarm configurations are present and operational.
Limitations and Operational Precautions
- Redundant Server Staggered Download: In redundant OS Server environments, never download to both servers simultaneously. Always download to the Standby partner first, activate runtime, verify synchronization, and then download to the primary server.
- Avoid Manually Renaming Database Files: Never manually rename
.mdfor.ldffiles using Windows Explorer while WinCC is running. Manual file renaming desynchronizes SQL master catalogs. - Network Stability: OS project downloads can involve multi-gigabyte transfers. Ensure the Terminal Bus network operates on stable, wired Gigabit Ethernet switches.
Engineer FAQ
Why did the error specifically point to OSAS.ldf?
Because .ldf is the Microsoft SQL Server transaction log file. SQL Server maintains an active write-lock on the log file whenever a database is open, making it the first file to trigger a sharing violation during file copy.
Can I download changes only instead of the entire project?
Yes, if changes are limited to picture files (.pdl) or scripts. However, if database tags, alarm structures, or server packages have changed, an entire download is recommended to ensure database consistency.
What should I do if deleting the project folder gives 'Access Denied'?
Restart the SQL Server (WINCC) service in Windows Services to release all file handles, or reboot the OS Server PC.
Technical References
- SIMATIC Process Control System PCS 7 PC Configuration Manual (V8.1)
- SIMATIC WinCC V7.3 System Manual: Working with Projects
- Microsoft SQL Server: Managing Database Files and Transaction Logs
- Siemens Industry Online Support: Troubleshooting OS Download Failures (SIOS Entry ID 109780813)
Related Articles
- Resolving Error 0x8004620F (InternalGetAso) During OS Client Project Download
- Resolving WinCC Runtime Hanging at 'Initializing Archive Management' After Computer Rename
- Configuring Simatic Shell for Multi-Network Adapter Architectures
Related Tags
- Download OS
- OSAS.ldf
- SQL Server
- File Lock
- Error Copying Project
- PCS 7 Engineering