Resetting WinCC SQL Server Database Instances and Halting Services in SIMATIC PCS 7
When WinCC Runtime fails to activate on a redundant standby OS server following an engineering download in SIMATIC PCS 7, locked database handles or stalled background services can be cleanly reset without rebooting the computer using the official Siemens utility Reset_WinCC.vbs or SQL Server Configuration Manager. In Windows, open an elevated Command Prompt and execute 'C:\Program Files (x86)\Siemens\WinCC\bin\Reset_WinCC.vbs' to terminate all hanging WinCC processes (such as CCProjectStudio.exe and pdlrt.exe). Alternatively, open SQL Server Configuration Manager, locate service 'SQL Server (WINCC)', right-click to select 'Restart', and re-initiate runtime activation.
Table of Contents
- Executive Summary
- WinCC Process Architecture: Daemons, Database Instances, and Locks
- Why Runtime Fails to Start After OS Standby Download
- The Reset_WinCC.vbs Utility vs SQL Server Configuration Manager
- WinCC Service Diagnostic and Reset Method Comparison
- Step-by-Step Procedure to Reset Services and Databases
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Executive Summary
Maintaining high availability across redundant SIMATIC PCS 7 Operator Stations requires compiling the master OS and downloading project updates to both the primary server (OS Master) and the secondary server (OS Standby). However, following a project download, commissioning engineers frequently encounter a condition where the OS Master activates cleanly, but the OS Standby server hangs during runtime startup or reports database connection errors. This failure occurs when residual WinCC runtime processes (CCProjectStudio.exe, pdlrt.exe, CCDataExchange.exe) or locked Microsoft SQL Server database handles remain active from the previous execution session. Rather than performing disruptive full operating system reboots, automation engineers can utilize specialized Siemens diagnostic scripts and SQL management tools to reset database instances cleanly. This guide details the recovery procedure.
WinCC Process Architecture: Daemons, Database Instances, and Locks
A running WinCC SCADA station coordinates dozens of interdependent background processes:
CCProjectStudio.exe: Manages project configuration and database connections.pdlrt.exe(Picture Data Language Runtime): Executes the graphics display engine.CCDataExchange.exe: Manages server-to-server redundancy synchronization and archive replication.sqlservr.exe(MSSQL$WINCC): The Microsoft SQL Server instance hosting the runtime and configuration tables.
If a previous runtime session terminated abnormally, sqlservr.exe retains locked transaction file handles on <Project>.ldf, preventing the newly downloaded project from mounting.
Why Runtime Fails to Start After OS Standby Download
When SIMATIC Manager downloads an OS to the standby server via PLC > Download, it must overwrite existing project files. If an orphaned WinCC process is still active in Windows Task Manager, Windows blocks write access to DLLs or database files. The download finishes with warnings, leaving the standby project in a desynchronized state.
The Reset_WinCC.vbs Utility vs SQL Server Configuration Manager
Siemens supplies two primary mechanisms to clear stalled WinCC states:
Reset_WinCC.vbs: A specialized Visual Basic script supplied with all WinCC installations. It systematically sends termination signals to all registered WinCC processes, detaches hanging database instances, and resets the communication channel handlers without damaging project data.- SQL Server Configuration Manager: Allows engineers to restart the dedicated
SQL Server (WINCC)service, flushing all cached buffers and releasing locked file pointers.
WinCC Service Diagnostic and Reset Method Comparison
The following table compares methods for stopping WinCC services and clearing locked database instances:
Reset_WinCC.vbsMSSQL$WINCC service instancenet stop)MSSQL$WINCC via CLI.exe processesStep-by-Step Procedure to Reset Services and Databases
Method 1: Executing Reset_WinCC.vbs (Recommended)
- Close WinCC Explorer and SIMATIC Manager if open.
- Open Windows Start Menu, type
cmd, right-click Command Prompt, and select Run as administrator. - In the command prompt, execute the following command:
"C:\Program Files (x86)\Siemens\WinCC\bin\Reset_WinCC.vbs" - A command window appears listing terminated WinCC processes.
- Wait approximately 15 to 30 seconds until the command window closes automatically.
- Open Windows Task Manager; verify that no processes beginning with
CC*orpdl*are running.
Method 2: Restarting the WinCC SQL Server Service
- Navigate to Start > All Programs > Microsoft SQL Server > Configuration Tools > SQL Server Configuration Manager.
- In the left-hand pane, click on SQL Server Services.
- In the right-hand list, locate SQL Server (WINCC).
- Right-click SQL Server (WINCC) and select Restart.
- Once the service returns to state 'Running', open the OS project in WinCC Explorer and activate Runtime.
Verification
To verify that WinCC databases and services are operational:
- Runtime Activation Test: On OS Standby, click the Activate button in WinCC Explorer. Confirm that the startup progress bar advances through 'Alarm Logging', 'Tag Logging', and 'Graphics' without halting.
- Redundancy State Inspection: In the Windows taskbar tray, open the WinCC Redundancy icon. Confirm that the status reports 'Standby: In Runtime' and 'Master: In Runtime' with active synchronization.
- Diagnostic Log Check: Open
C:\Program Files (x86)\Siemens\WinCC\Diagnostics\WinCC_Sys_01.log. Confirm that noDatabase open errororSharing violationentries appear.
Limitations and Operational Precautions
- Never Force Kill sqlservr.exe: Never terminate
sqlservr.exevia Windows Task Manager 'End Process Tree'; terminating SQL Server mid-write can corrupt the transaction log (.ldf), requiring database restoration from backup. - Redundant Master Protection: Ensure you execute
Reset_WinCC.vbsstrictly on the affected standby node; never run reset scripts on an active OS Master while production is running. - Archive Synchronization Delay: Following a database reset and runtime start, allow 5 to 15 minutes for the WinCC Redundancy Control to synchronize historical archive gaps before testing client failover.
Engineer FAQ
Does running Reset_WinCC.vbs delete my project tags or graphic screens?
No. Reset_WinCC.vbs merely terminates stuck application processes and releases locked file handles; it does not delete or modify project files.
Where is Reset_WinCC.vbs located on 32-bit vs 64-bit Windows?
On 64-bit Windows, it is located at C:\Program Files (x86)\Siemens\WinCC\bin\Reset_WinCC.vbs. On older 32-bit systems, it resides under C:\Program Files\Siemens\WinCC\bin\.
Why does WinCC Explorer display 'Project is already open on another computer' after a crash?
A crash leaves the hidden lock file <ProjectName>.lck in the project directory. Running Reset_WinCC.vbs and deleting the .lck file clears this condition.
Technical References
- Siemens Industry Online Support Entry ID 33123686: Which settings should you check if OS loading fails with PCS 7?
- Siemens AG: SIMATIC WinCC V7.3 System Manual - Troubleshooting and Diagnostics (Doc No. A5E34988772)
- Siemens Industry Online Support Entry ID 868014: Operating SIMATIC WinCC in a Windows Network
Related Articles
- https://industrialautomation.net/search?query=reset_wincc.vbs+terminate+hanging+processes
- https://industrialautomation.net/search?query=sql+server+wincc+service+restart+procedure
- https://industrialautomation.net/search?query=redundant+os+standby+runtime+activation+failure
Related Tags
- https://industrialautomation.net/search?query=simatic-pcs7
- https://industrialautomation.net/search?query=wincc-scada
- https://industrialautomation.net/search?query=sql-server
- https://industrialautomation.net/search?query=troubleshooting