Resolving WinCC V7.3 Installation Stuck on SQL Server 2008 R2 SP2

David Krause10 min read
SiemensTroubleshootingWinCC
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Resolving WinCC V7.3 Installation Stuck on SQL Server 2008 R2 SP2

Symptom: The SIMATIC WinCC V7.3 setup wizard advances to the work item SQL Server 2008 R2 Standard Edition SP2 (WinCC), displays the running state Installing..., and never reports success or failure. After several hours, the task is still listed as Installing, no event is written to the setup log that would indicate progress, and the setup.exe process does not consume measurable CPU time. A previous WinCC V7.3 install on the same machine was uninstalled before the failed reinstall. TIA Portal V12 and V13 are present, which deploy overlapping Microsoft SQL Server instances.

This document explains why the WinCC bundled SQL Server 2008 R2 SP2 setup hangs, the role of conflicting TIA Portal SQL instances, the supported coexistence rules, the cleanup sequence required to recover, and the verification steps that prove a clean install.

1. Problem Scope and Affected Versions

The hang is reproducible in the following configuration, which is the configuration of the original report:

Component Version Notes
SIMATIC WinCC V7.3 (DVD build) or V7.3 Update 1+ 32-bit HMI/runtime/SCADA core
Bundled database Microsoft SQL Server 2008 R2 Standard Edition SP2, 32-bit Shipped on the WinCC DVD; required for the WinCC archive database
Operating system Windows 7 Professional (SP1) 32-bit or 64-bit Hard requirement of WinCC V7.3
Co-installed engineering TIA Portal V12, TIA Portal V13 (Step 7 / WinCC Comfort/Professional) Deploys separate SQL Server 2005/2008 R2 instances
Framework .NET Framework 3.5 SP1, 4.x SQL setup dependency
Critical: WinCC V7.3 always installs a 32-bit Microsoft SQL Server 2008 R2 even on a 64-bit Windows host. Mixing 32-bit and 64-bit SQL Server instances on the same workstation is supported but must be performed by the WinCC setup; a manually installed 64-bit SQL 2008 R2 will block the bundled 32-bit install with a silent service-collision hang.

2. Root Cause Analysis

Three independent root causes produce the same observable symptom (setup stuck on SQL Server 2008 R2 Standard Edition SP2 (WinCC)):

2.1 Colliding SQL Server Instances from TIA Portal V12/V13

TIA Portal V12 installs a SQL Server 2005 Express instance (named SQLEXPRESS or MSSQLSERVER) for the project database. TIA Portal V13 upgrades or co-installs a SQL Server 2008 R2 instance. The WinCC setup enumerates Microsoft SQL Server registry keys under HKLM\SOFTWARE\Microsoft\Microsoft SQL Server and HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Server. When two SQL 2008 R2 versions target the same instance name, the WinCC setup waits indefinitely for the existing instance service to release its file handles and registry locks. The setup does not raise an error; the wait state is the error.

2.2 Leftover SQL Components from a Previous WinCC Uninstallation

The Microsoft Windows Installer (MSI) records for SQL Server 2008 R2 SP2 are not removed when the parent WinCC product is uninstalled because they are referenced by the TIA Portal V12/V13 product entries. The Setup Bootstrap log under %ProgramFiles%\Microsoft SQL Server\100\Setup Bootstrap\Log\ retains Summary.txt from the previous attempt, which the new setup reads to determine upgrade eligibility and then suspends pending a non-existent user prompt.

2.3 Missing .NET Framework 3.5 SP1 Repair State

SQL Server 2008 R2 setup requires .NET Framework 3.5 SP1 to be installed and in a consistent repair state. On Windows 7 systems that have had .NET 4.x layered on top, the assembly Microsoft.SqlServer.Chainer.Infrastructure silently fails to load, and the setup worker process spins on a wait handle instead of exiting with a logged error.

3. Diagnostic Procedure

Before any cleanup, capture the current state so the failure can be reproduced or escalated:

  1. Open Control Panel → Programs and Features and export the installed-product list with msinfo32 /report %USERPROFILE%\Desktop\sysinv.nfo for baseline.
  2. List SQL Server instances: open SQL Server Configuration Manager (or the 32-bit version under %SystemDrive%\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe if 32-bit) and note every named instance and its service state.
  3. From an elevated command prompt, run:
    sc query | findstr /I "MSSQL$"
    and
    reg query "HKLM\SOFTWARE\Microsoft\Microsoft SQL Server" /s | findstr "InstalledInstances"
  4. Collect the WinCC setup log from %TEMP%\SetupLog.htm and the SQL setup log from %ProgramFiles%\Microsoft SQL Server\100\Setup Bootstrap\Log\<timestamp>\Summary.txt.
  5. Verify Windows Installer service health: msiexec /regserver, then net start msiserver.

4. Cleanup Sequence

The recovery procedure removes all conflicting SQL components in the order below. Skipping an order or merging steps causes a fresh hang at a later stage.

4.1 Uninstall TIA Portal SQL Server Components

From Programs and Features, uninstall in the listed order. Restart the workstation between each removal so the MSI deferred actions finalize:

  1. Siemens TIA Portal V12 / V13 (only if the WinCC V7.3 workstation is dedicated to WinCC; otherwise skip and use the V13/WinCC V7.3 compatibility entry from Siemens support entry 50204569 to decide).
  2. Microsoft SQL Server 2005 (any instance: MSSQLSERVER, SQLEXPRESS, or V12/V13-specific named instances such as SQLEXPRESS2005).
  3. Microsoft SQL Server 2008 R2 (any pre-existing instance that is not the bundled WinCC one).
  4. Microsoft SQL Server Native Client, Microsoft SQL Server Setup Support Files.

4.2 Remove Orphaned Registry Keys

After uninstall, the following keys must be removed manually. Back up the registry first with reg export HKLM\SOFTWARE\Microsoft\Microsoft SQL Server %USERPROFILE%\sqlbkp.reg:

  • HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\<InstanceID> where InstanceID no longer maps to a valid installation.
  • HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Server\<InstanceID> on 64-bit Windows.
  • HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall entries whose DisplayName begins with Microsoft SQL Server 2008 R2.

4.3 Remove Orphaned Services and Folders

  1. Stop and delete stale services:
    sc stop MSSQL$WINCC
    sc delete MSSQL$WINCC
    sc stop SQLAgent$WINCC
    sc delete SQLAgent$WINCC
  2. Delete the program data directory %ProgramFiles%\Microsoft SQL Server\ (or the 32-bit path %ProgramFiles(x86)%\Microsoft SQL Server\) only if no other application requires SQL.
  3. Delete leftover setup logs: del /s /q "%ProgramFiles%\Microsoft SQL Server\100\Setup Bootstrap\Log\*.*".

4.4 Repair .NET Framework 3.5 SP1

  1. Open Control Panel → Programs and Features → Microsoft .NET Framework 3.5 SP1, select Repair.
  2. Re-register ASP.NET: aspnet_regiis -i (32-bit) or aspnet_regiis -i from %Windows%\Microsoft.NET\Framework64\v2.0.50727.
  3. Re-register the SQL chainer component: regsvr32 %SystemRoot%\SysWOW64\msi.dll (verify, not the fix).

4.5 Windows Installer Reset

Force the Windows Installer to re-evaluate its feature state. From an elevated prompt:

net stop msiserver
msiexec /unregserver
msiexec /regserver
net start msiserver

5. Clean Installation of WinCC V7.3

  1. Disable User Account Control (UAC) for the duration of the install: reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f and reboot.
  2. Insert the WinCC V7.3 DVD. If the autorun does not launch, run DVD:\Setup\Setup.exe as administrator.
  3. When the setup reaches SQL Server 2008 R2 Standard Edition SP2 (WinCC), monitor the new log %ProgramFiles%\Microsoft SQL Server\100\Setup Bootstrap\Log\<timestamp>\Summary.txt. A healthy install writes the line Setup completed with action: Install within 8–12 minutes on Windows 7.
  4. If the install succeeds, the bundled instance MSSQLSERVER (or the named instance WINCC on 64-bit) is registered under the WinCC SQL service group.

6. TIA Portal V13 / WinCC V7.3 Coexistence

WinCC V7.3 and TIA Portal V13 can coexist on the same engineering workstation. The official compatibility matrix is published in Siemens support entry 50204569. The relevant points:

TIA Portal Version Allowed with WinCC V7.3 SP1/SP2 Required SQL Server Action
V12 (Step 7 / WinCC Comfort V11) Yes, separate SQL 2005 instance Keep; do not remove before WinCC install
V13 (Step 7 / WinCC Professional V13) Yes, but V13 must be installed after WinCC V7.3 SP1+ WinCC SQL 2008 R2 SP2 instance is reused; no fresh install
V13 SP1 No, requires WinCC V7.3 Update 1 or higher Update WinCC first
V14 / V15 No Use separate workstation

If TIA Portal V13 must be installed first (unavoidable in a few repair scenarios), the order is reversed: install TIA V13, then install WinCC V7.3 Update 1 or higher, and allow the WinCC setup to upgrade the existing SQL 2008 R2 instance to SP2 in place.

7. Optional Upgrade to SQL Server 2008 R2 SP3

Microsoft released SQL Server 2008 R2 Service Pack 3 as a cumulative update. Applying SP3 over the WinCC-bundled SP2 is supported by Siemens and adds the post-SP2 fixes without affecting WinCC archive compatibility. Procedure:

  1. Download the SP3 package SQLServer2008R2SP3-KB2979597-x64-ENU.exe (or -x86 for the 32-bit WinCC instance on a 64-bit OS via WOW64).
  2. Stop the WinCC runtime and the SQL Server (WINCC) and SQL Server Agent (WINCC) services.
  3. Run the SP3 executable, accept the licensing terms, select the WINCC instance for upgrade.
  4. Restart the services and verify SELECT @@VERSION reports 10.50.6000.34 or later.
Warning: Do not apply SP3 before WinCC V7.3 is installed. The bundled setup refuses to install on a SQL instance newer than SP2 and will re-create the hang symptom.

8. Verification

After a clean install, validate the deployment in the order below. Each step produces a specific observable result; if any step fails, re-run the cleanup sequence from Section 4.

# Check Command / Action Expected Result
1 SQL instance registered reg query "HKLM\SOFTWARE\Microsoft\Microsoft SQL Server" /v InstalledInstances Contains MSSQLSERVER or WINCC
2 SQL service running sc query MSSQLSERVER (or sc query MSSQL$WINCC) STATE: 4 RUNNING
3 SQL version Open SQL Server Management Studio, run SELECT @@VERSION Microsoft SQL Server 2008 R2 (SP2) 10.50.4000.0 or (SP3) 10.50.6000.34
4 WinCC service running sc query WinCC and sc query CCAgent STATE: 4 RUNNING
5 WinCC project database reachable WinCC Explorer → Computer properties → Database tab → Test Connection "Connection successful" dialog
6 No remaining setup process Task Manager → Setup.exe and SQLServr.exe Setup.exe absent; SQLServr.exe present
7 Setup log clean Open %TEMP%\SetupLog.htm Final line: Setup finished successfully

9. Troubleshooting Matrix

Symptom Likely Cause Corrective Action
Setup hangs at SQL 2008 R2 SP2 step, no CPU activity Service collision with TIA V12/V13 SQL instance Section 4.1, 4.2, 4.3
Setup rolls back, log shows error 0x80004005 Missing .NET 3.5 SP1 Section 4.4
Setup reports "Another installation is in progress" Windows Installer stuck Section 4.5; also taskkill /f /im msiexec.exe before retry
SQL Server (WINCC) fails to start, error 1053 Orphaned registry service entry sc delete MSSQL$WINCC then re-run WinCC setup with repair
Setup completes but WinCC Explorer cannot connect TDS protocol blocked by firewall Open TCP 1433 inbound for the WinCC instance; verify named-pipes if using local SQL
Setup log shows "Performance counter registry hive is corrupt" Counter DLL not registered lodctr /r from an elevated prompt, then reboot
Setup log shows "Wait on the Database Engine recovery handle failed" Insufficient NTFS rights on the SQL data path Grant SYSTEM and Administrators Full Control on %ProgramFiles%\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\

10. Field-Proven Caveats

  • The WinCC V7.3 setup is a 32-bit process (Setup.exe under DVD:\Setup\x86 for legacy builds). On 64-bit Windows, the WOW64 redirection must remain enabled; do not disable it for the WinCC install.
  • Anti-virus products that hook MSI callbacks (Symantec Endpoint Protection, McAfee, Trend Micro OfficeScan) commonly cause the same hang. Exclude %ProgramFiles%\Microsoft SQL Server\ and the WinCC install path before retrying.
  • Windows 7 Professional supports up to 20 simultaneous SMB sessions, which is enough for WinCC V7.3; Starter and Home Basic editions are not supported and can produce a similar silent hang.
  • Do not install SQL Server 2008 R2 manually before WinCC. The WinCC setup will not detect a pre-installed instance and will start a second copy, leaving both partially configured.
  • Always uninstall TIA Portal V12/V13 with the Siemens Automation License Manager closed. If the License Manager holds a handle on the SQL instance, the uninstaller of TIA leaves the SQL service registered but non-functional, recreating the original hang.

11. Frequently Asked Questions

Why does WinCC V7.3 install a 32-bit SQL Server 2008 R2 even on 64-bit Windows?

WinCC V7.3 itself is a 32-bit SCADA application; the bundled SQL Server 2008 R2 SP2 mirrors that architecture. The 64-bit OS runs the 32-bit SQL through WOW64, but the WinCC OLE-DB provider can only consume a 32-bit instance. Installing a 64-bit SQL 2008 R2 manually creates a bitness mismatch that the setup does not negotiate.

Can TIA Portal V12, V13, and WinCC V7.3 share one workstation?

Yes. Install WinCC V7.3 Update 1 or higher first, then install TIA Portal V13; TIA V12 may be installed in any order. The full compatibility rules are defined in Siemens support entry 50204569. Mixing WinCC V7.3 with TIA V14 or V15 on the same PC is not supported.

Is SQL Server 2008 R2 SP3 supported with WinCC V7.3?

Yes. Apply SP3 after WinCC V7.3 is installed and the bundled SP2 instance is running. The SP3 installer from the Microsoft Download Center is cumulative and can be used to upgrade both the 32-bit and 64-bit SQL 2008 R2 instances; the WinCC archive schema is unchanged.

How long should the SQL Server 2008 R2 SP2 install normally take?

On Windows 7 Professional with an SSD, the WinCC-bundled SQL 2008 R2 SP2 install completes in 8–12 minutes. If the worker process shows 0% CPU and 0% disk for more than 20 minutes, the install is hung and the cleanup sequence in Section 4 must be applied.

What Windows Installer error code indicates the TIA SQL collision?

The setup log records Error 0x80004005 (Unspecified error) with the function SqlServerSetupChainer stuck in WaitForSqlSetup. The hang itself produces no error code on screen; the error must be read from %ProgramFiles%\Microsoft SQL Server\100\Setup Bootstrap\Log\<timestamp>\Detail.txt.

Back to blog