Problem Overview
WinCC Flexible 2007 and 2008 install routines deploy the Microsoft SQL Server 2000 Desktop Engine (MSDE 2000, version 8.0) or, in the WinCC Flexible 2008 SP5 update, SQL Server 2005 Express SP3 as the back-end repository for project libraries, recipe archives, alarm logs, audit trails, and runtime data sets. When the embedded SQL setup fails at the start of the WinCC Flexible installation sequence, the entire installer halts and reports a generic "could not be installed" message with no native log capture visible to the operator. This failure pattern appears across the entire WinCC Flexible product line (Compact, Standard, Advanced editions) and is independent of HMI panel type, project size, or runtime target.
The visible symptom is one of the following error strings emitted either by the Windows Installer host or by the embedded MSDE 2000 setup runtime:
Setup failed to install the SQL Server Database EngineThe instance name specified is invalidA previous installation of MSDE has been detected. Setup will exit.MSDE installation failed - see setup log for detailsSQL Server Setup cannot continue because the instance name is invalid or already in use-
Internal Error 2711with an MSI rollback loop Setup failed to configure the server. Refer to the SQL Server setup log for details.
Because WinCC Flexible bundles its own MSDE payload, the Siemens Setup wrapper never exposes the underlying SQL Server error log to the GUI, leaving the technician with a black-box failure. Root causes cluster into five families: incomplete uninstallation of a prior SQL Server 2000/2005 instance, antivirus or file-system filter interception of the SQL setup binary, missing Microsoft Message Queuing (MSMQ) component required by SQL Server services, Microsoft Office 2003/2007 MSI installer collision, and insufficient local-administrator privileges for the installing account.
Affected Products and Versions
| Product | SQL Component | Version | Compatible OS |
|---|---|---|---|
| WinCC Flexible 2007 | MSDE 2000 (8.00.2039) | SP1, SP2, SP3 | Windows XP SP2/SP3, Windows Server 2003 |
| WinCC Flexible 2008 | MSDE 2000 (8.00.2039) | SP1, SP2, SP3, SP4 | Windows XP SP2/SP3, Windows Vista Business SP1, Windows Server 2003 |
| WinCC Flexible 2008 SP5 | SQL Server 2005 Express SP3 (9.00.5000) | SP5 | Windows 7 Professional 32-bit, Windows Server 2008 |
Root Cause Matrix
| Symptom | Primary Cause | Diagnostic Path |
|---|---|---|
| "The instance name specified is invalid" | Residual SQL instance from prior install (default MSSQLSERVER or named instance) | Check registry HKLM\Software\Microsoft\Microsoft SQL Server\Instance Names
|
| "Setup failed to install the SQL Server Database Engine" | Antivirus or file-system filter driver intercepting setup.exe writes | Temporarily disable AV and re-run; inspect %TEMP%\sqlsetup*.log
|
| "MSMQ is not configured" or service fails to start | Message Queuing service missing or disabled | Verify "Message Queuing" feature in Windows Components |
| "Internal error 2711" or MSI rollback loop | Office 2003/2007 MSI component collision | Uninstall Office, clear C:\MSOCache, retry WinCC Flexible setup |
| "Access is denied" or silent exit | Local administrator privilege missing or UAC blocking silent elevation | Verify account in local Administrators group, disable UAC |
| "SAPWD does not meet strong password requirements" | Password missing complexity (upper, lower, digit, symbol, 8+ chars) | Reissue setup with compliant SAPWD="..."
|
| Install succeeds but Runtime cannot connect to SQL | Named Pipes disabled, SQL Browser service stopped | Enable Named Pipes and TCP/IP in SQL Server Network Utility |
Pre-Installation Checklist
- Log in with a local administrator account (not a domain user with admin rights via UAC token only). Confirm via
net localgroup administratorsfrom an elevated command prompt. - Disable all third-party antivirus, anti-malware, and host-based intrusion prevention software. Configure Windows Defender real-time protection to off through Group Policy or the Security Center.
- Disable Windows Firewall or add an inbound allow rule for TCP 1433 (SQL Server default instance) and the SQL Server Browser service on UDP 1434.
- Remove Microsoft Office 2003 and 2007 if installed. Office 2003 MSI components share file identity hashes with the SQL Server 2000 MSDE installer and trigger MSI rollback chains.
- Stop all running SQL services:
net stop MSSQLSERVER,net stop SQLSERVERAGENT,net stop MSSQLServerADHelper,net stop SQLBrowser. - Verify MSMQ is installed: Control Panel → Add/Remove Programs → Add/Remove Windows Components → check "Message Queuing Server".
- Confirm at least 1.5 GB free disk space on the system drive for the WinCC Flexible install plus the embedded SQL payload plus a working buffer.
- Insert the WinCC Flexible installation DVD or mount the ISO file. Note the drive letter, e.g.
D:. - Verify the OS architecture matches the WinCC Flexible media: 32-bit media installs only on 32-bit hosts; WinCC Flexible 2008 SP5 64-bit SQL 2005 Express payload requires a 64-bit OS image.
- Back up any existing project archives under
%USERPROFILE%\Siemens\WinCC Flexiblebefore modifying the registry or removing Office.
Resolution Procedure
Step 1 - Remove Residual SQL Server Instances
The "instance name specified is invalid" error is the most common symptom and almost always indicates a leftover SQL Server registration from a previously removed SQL Server 2000, MSDE, or SQL Server 2005 Express installation. The MSDE installer cannot reuse the registered instance name and cannot overwrite the existing entry, so the embedded setup aborts before any binaries are written.
- Open the registry editor (
regedit.exe) as administrator. - Navigate to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server. - Delete subkeys
Instance Names,MSSQLServer,MSSQLServerADHelper, and any subkey beginning withWINCCFLEXIBLE. - On 64-bit hosts also check
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Serverand remove the same subkeys. - Navigate to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstalland delete any SQL Server or MSDE GUID entries (look forDisplayNamecontaining "Microsoft SQL Server" or "MSDE"). - Delete the install directories:
C:\Program Files\Microsoft SQL Server\MSSQL,C:\MSSQL7,C:\MSSQL, and any folder containingsqlservr.exe. - Delete the data directories:
C:\Program Files\Microsoft SQL Server\MSSQL$WINCCFLEXIBLE\DataandC:\MSSQL\Data. - Run the Siemens MSDE Cleanup Tool (referenced in Siemens support entry ID 22054701) if the registry audit still shows residual install traces. The tool reports "No conflict found" when no remaining traces exist.
- Reboot to clear any locked handles on the deleted directories.
Step 2 - Activate Microsoft Message Queuing (MSMQ)
MSDE 2000 and SQL Server 2005 Express both require MSMQ for internal service communication, asynchronous trigger execution, and the replication services used by WinCC Flexible's alarm logging runtime and recipe management. Without MSMQ enabled, the SQL Server service fails to start post-installation and the WinCC Flexible setup rolls back the entire transaction.
- Open Control Panel → Add or Remove Programs (Windows XP) or Programs and Features (Windows 7).
- Click "Add/Remove Windows Components" on the left pane.
- Check "Message Queuing Server" and, if listed, "Message Queuing Triggers" sub-option.
- Click OK and provide the Windows installation media when prompted.
- Reboot after the MSMQ install completes so the kernel-level driver loads.
Verify the service is running from an elevated command prompt with sc query msmq. Expected output: STATE: 4 RUNNING. Also confirm mqsvc.dll is registered via regsvr32 /s mqsvc.dll if the service starts and stops immediately.
Step 3 - Address Microsoft Office 2003/2007 Conflict
The MSDE 2000 installer shares Windows Installer file hash tokens with Microsoft Office 2003 and 2007 components. When Office is installed, the MSI database Office12.msi or Office11.msi takes precedence over the embedded MSDE installer files and the install rolls back with "Internal Error 2711" or "Error 1603". The hash collision is well documented in Microsoft's Windows Installer error 2711 reference.
- Uninstall Microsoft Office 2003 or 2007 in Add or Remove Programs. Use the Microsoft Fix-it removal tool if standard uninstall fails: Microsoft Program Install and Uninstall Troubleshooter.
- Delete the Office installation source folder to prevent MSI hash collisions:
C:\MSOCache\All Usersand any user-specific MSOCache subfolders. - Remove leftover Office registry entries under
HKLM\SOFTWARE\Microsoft\OfficeandHKCU\SOFTWARE\Microsoft\Office. - Reboot and re-run WinCC Flexible setup with administrator privileges.
If Office 2007 is a business requirement, retain it and install MSDE manually using the procedure in Step 4, bypassing the bundled installer entirely.
Step 4 - Manually Install MSDE Before WinCC Flexible
Bypassing the embedded MSDE installer removes the dependency on the Siemens Setup wrapper's transaction handling. Manual install permits verbose logging and gives full control over the instance name, service account, and authentication mode. Use this procedure when Step 1 through Step 3 do not resolve the install failure.
- Insert the WinCC Flexible DVD or mount the ISO.
- Open a command prompt as administrator (
cmd.exe→ right-click → Run as administrator). - Change directory to the MSDE payload:
cd /d D:\MSDE\DISK1\MSDE(substitute the actual DVD drive letter; on WinCC Flexible 2008 SP5 the path may beD:\SQL\). - Run setup with the parameters below. The password must contain at least one uppercase, one lowercase, one digit, one symbol, and be 8 characters or longer to satisfy SQL Server 2000/2005 strong password policy.
setup.exe SAPWD="WinCC!2024Sec" INSTANCENAME="WINCCFLEXIBLE" SECURITYMODE=SQL DISABLENETWORKPROTOCOLS=0 /L*v C:\msde_install.log
- Wait for completion (typically 60-90 seconds on Windows XP SP3).
- Verify the install by querying the SQL Server version from the command line:
osql -S .\WINCCFLEXIBLE -U sa -P "WinCC!2024Sec" -Q "SELECT @@VERSION"
Expected output begins with: Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) or, for WinCC Flexible 2008 SP5, Microsoft SQL Server 2005 - 9.00.5000.00 (Intel X86).
- Inspect
C:\msde_install.logfor any warnings about authentication mode, collation, or service startup. Address each warning before proceeding to Step 5.
Step 5 - Install WinCC Flexible with Custom Setup
- Re-insert or remount the WinCC Flexible DVD.
- Run
setup.exeas administrator. - Select "Custom Installation" in the setup dialog.
- In the component tree, deselect the "MSDE / SQL Server" component — it is already installed and starting manually.
- Choose the WinCC Flexible components required: ES (Engineering Station), Runtime, Communication drivers (PROFIBUS, PROFINET, MPI).
- Accept the default install path
C:\Program Files\Siemens\WinCCFlexibleunless corporate standards dictate otherwise. - Enter the licensing data or activate the floating license server address.
- Complete the wizard. The installer should skip the SQL step entirely and proceed directly to file copy.
Step 6 - Install WinCC and WinCC Flexible on the Same PC
When the host runs WinCC (SCADA) alongside WinCC Flexible, the install order is critical. The WinCC product ships its own SQL Server instance (default instance name WINCC) and uses different SQL authentication rules from the MSDE 2000 instance deployed by WinCC Flexible.
- Install WinCC first. Allow it to install its bundled SQL Server 2005 Express instance.
- Reboot and verify the WinCC instance with
osql -S .\WINCC -E -Q "SELECT @@VERSION". - Install WinCC Flexible second. The setup detects the existing SQL Server and installs MSDE into a separate instance named
WINCCFLEXIBLEon a separate port (default 1434 to avoid collision with the WINCC instance). - If WinCC Flexible is installed first, the WinCC setup will reject the SQL configuration and require a manual SQL reinstall of the WINCC instance, doubling the deployment time.
Error Code and Log Reference
| Error Message | Log Location | Resolution Path |
|---|---|---|
| The instance name specified is invalid |
%TEMP%\sqlsetup*.log, %WINDIR%\sqlstp.log
|
Remove residual SQL instances per Step 1 |
| SQL Server Setup cannot write to the specified directory | %WINDIR%\sqlstp.log |
Check NTFS permissions on %ProgramFiles%\Microsoft SQL Server
|
| A previous installation of MSDE has been detected | %WINDIR%\setupapi.log |
Run MSDE Cleanup Tool, then registry audit |
| Internal Error 2711 | %TEMP%\MSI*.LOG |
Office MSI collision - remove Office per Step 3 |
| Setup failed to configure the server | %WINDIR%\sqlstp.log |
Verify MSMQ active, account has admin rights |
| The specified password does not meet strong password requirements | setup screen | SAPWD must contain upper, lower, digit, symbol, 8+ chars |
| Service MSSQL$WINCCFLEXIBLE failed to start | Event Viewer → Application log | Verify MSMQ, master.mdf not locked, service account valid |
| Cannot generate SSPI context | Runtime log | Use SQL authentication instead of Windows authentication; check SPN registration |
| Database 'CC_Library' is marked RESTORING | Event Viewer → Application log | Restore last good backup, then DBCC CHECKDB |
Network Protocol and Service Configuration
After the MSDE 2000 install completes, the SQL Server service by default listens on Named Pipes only. WinCC Flexible Runtime, when deployed across a panel-to-PC network, requires TCP/IP enabled on port 1433 (or the named instance dynamic port). Use the SQL Server 2000 Network Utility (svrnetcn.exe) to enable additional protocols:
- Run
svrnetcn.exefromC:\Program Files\Microsoft SQL Server\80\Tools\Binn. - Select the
WINCCFLEXIBLEinstance. - Enable TCP/IP. Set the default port to 1433 to allow predictable firewall rules, or enable the SQL Server Browser service on UDP 1434 for dynamic port assignment.
- Enable Named Pipes for local inter-process calls on the same host.
- Stop and restart the
MSSQL$WINCCFLEXIBLEservice fromservices.msc.
For WinCC Flexible 2008 SP5 deployments using SQL Server 2005 Express, use the SQL Server Configuration Manager (SQLServerManager.msc) for the equivalent protocol configuration.
OS Compatibility Reference
| Operating System | WinCC Flexible 2007 | WinCC Flexible 2008 | Required Hotfix / Component |
|---|---|---|---|
| Windows XP SP2 | Supported | Supported | KB838459, MSMQ Server, MSDE |
| Windows XP SP3 | Supported | Supported | MSMQ Server, MSDE |
| Windows Vista Business SP1 | Not supported | Limited (SP1+ only) | UAC must be disabled, MSMQ Server |
| Windows 7 Professional 32-bit | Not supported | Supported (SP5+) | .NET 3.5 SP1, MSMQ feature, SQL 2005 Express SP3 |
| Windows 7 64-bit | Not supported | Not supported | Migrate to TIA Portal WinCC |
| Windows 8 / 8.1 | Not supported | Not supported | Migrate to TIA Portal WinCC |
| Windows 10 / 11 | Not supported | Not supported | Migrate to TIA Portal WinCC |
| Windows Server 2003 R2 | Supported | Supported | MSMQ Server, MSDE |
| Windows Server 2008 R2 | Not supported | Limited (32-bit only) | .NET 3.5 SP1, MSMQ feature |
Verification
- Open WinCC Flexible via Start → Siemens Automation → WinCC Flexible → WinCC Flexible ES. Verify the project tree loads without SQL connection errors in the output window.
- Create a new project, add an HMI tag with a real variable, save the project, close WinCC Flexible, then reopen. Verify the project loads from SQL without re-prompting for credentials.
- Open SQL Server Enterprise Manager (MSDE 2000) from
C:\Program Files\Microsoft SQL Server\80\Tools\Binn\SQL Server Enterprise Manager.mscor SQL Server Management Studio Express (SQL 2005 Express) and confirm theWINCCFLEXIBLEinstance is registered with databasesCC_Library,CC_Alarming, andCC_Recipe. - From a command prompt, run
sc query MSSQL$WINCCFLEXIBLE. Expected output:STATE: 4 RUNNING. - Start the WinCC Flexible Runtime simulation with a sample project. Add an alarm, trigger it, stop Runtime, restart Runtime. Verify the alarm persists across the stop/restart cycle.
- Validate the SQL authentication handshake:
osql -S .\WINCCFLEXIBLE -U sa -P "WinCC!2024Sec" -Q "SELECT name FROM sysdatabases". Expected databases listed includemaster,model,msdb,tempdb, and the WinCC Flexible libraries.
Troubleshooting Matrix
| If you see... | Then check... | And apply... |
|---|---|---|
| Setup halts at MSDE install with no log | Antivirus blocking setup.exe | Disable AV, re-run setup, capture setup.exe /L*v
|
| Instance name invalid | Residual SQL registry keys | Step 1 cleanup, then run MSDE Cleanup Tool |
| Service MSSQL$WINCCFLEXIBLE fails to start | MSMQ not installed, master.mdf locked | Step 2 MSMQ activation; remove leftover data files |
| MSI rollback during install | Office 2003/2007 conflict | Step 3 Office removal, clear MSOCache |
| Silent exit immediately on launch | Account privileges, UAC | Use local admin account, disable UAC, re-run as administrator |
| Install succeeds, Runtime cannot connect | SQL service not started, Named Pipes disabled | Set SQL Server Network Utility to enable Named Pipes and TCP/IP |
| Cannot generate SSPI context | Active Directory domain issues, SPN missing for SQL service | Switch to SQL authentication; register SPN with setspn
|
| Database 'CC_Library' is corrupted | Sudden power loss during write, disk full | Run DBCC CHECKDB('CC_Library', REPAIR_ALLOW_DATA_LOSS); restore from backup |
| Log file SQLAGENT.OUT shows ODBC error 17 | SQL Server service account mismatch | Reset SQL service account to LocalSystem in services.msc |
| WinCC Flexible ES crashes on project open | Antivirus scanning .srf files in real-time | Add project folder to AV exclusion list |
Migration to TIA Portal WinCC
For environments where the host OS is Windows 10 or Windows 11 and the legacy WinCC Flexible install path cannot be adapted, the supported migration target is TIA Portal WinCC (Comfort/Professional edition). The migration workflow is documented in Siemens support entry ID 22054701 and in the WinCC Flexible → TIA Portal migration manuals available on the Siemens support portal.
Project conversion uses the WinCC Flexible ES → TIA Portal converter built into the TIA Portal project view; however, panel image compatibility must be verified per HMI model (KTP, TP, OP, MP series) against the TIA Portal device catalog before cutover. Recipe data, alarm logs, and project libraries must be exported from the MSDE 2000 instance and re-imported into the TIA Portal SQL Server instance using the WinCC Recipe/Alarm Export tool.
For SQL Server install issues on Windows 11 with TIA Portal WinCC, follow Microsoft's Install SQL Server from the Installation Wizard reference rather than the legacy MSDE path. The newer SQL Server 2019/2022 Express payload bundles with TIA Portal V17+ does not share the MSDE file hash collisions and is not affected by the Office 2003/2007 installer conflict.
Best Practices and Hardening
- Always install MSDE and WinCC Flexible on a dedicated engineering workstation. Do not co-locate Office, Visual Studio, or third-party development tools that share MSI file hashes.
- Snapshot or image the workstation immediately after a successful install so future recoveries do not repeat the SQL configuration.
- Move the SQL Master, MSDB, and TempDB files to a dedicated non-OS volume to prevent drive-space exhaustion from taking down the engineering environment.
- Schedule weekly
DBCC CHECKDBjobs on theWINCCFLEXIBLEinstance to detect page corruption early. - Maintain a documented SA password in a corporate password vault. The default blank SA password is rejected by strong-password policy enforcement in SP2+.
- Disable the SQL Server Browser service on the engineering host if no other SQL instances are running. This reduces UDP 1434 attack surface.
- Restrict inbound TCP 1433 and UDP 1434 on the engineering workstation firewall to the panel IP range only.
FAQ
Why does the WinCC Flexible installer fail immediately at the SQL Desktop Engine step with no detail?
The installer bundles MSDE 2000 setup as an MSI child transaction. When the child MSI fails, the parent setup rolls back without surfacing the SQL error log. The most common causes are residual SQL instances from prior installs, antivirus file-write interception, or Office 2003/2007 MSI collisions. Review %TEMP%\sqlstp*.log and %WINDIR%\sqlstp.log after a failed attempt to identify the underlying MSI error code.
Can WinCC Flexible 2008 be installed on Windows 10 or Windows 11?
No. WinCC Flexible 2008 was tested against Windows XP SP3, Windows Vista SP1, and Windows 7 (32-bit only, SP5+). For Windows 10 or Windows 11 hosts, migrate to TIA Portal WinCC Comfort or Professional edition. SQL Server install errors on Windows 11 typically require following the SQL Server installation wizard guide rather than the legacy MSDE 2000 path.
What is the correct install order when both WinCC and WinCC Flexible must coexist on the same PC?
Install WinCC (SCADA) first. It deploys its own SQL Server 2005 Express instance named "WINCC". Then install WinCC Flexible second; it creates a separate MSDE instance named "WINCCFLEXIBLE" on a separate port. Reversing the order causes the WinCC SQL configuration step to fail and forces a manual reinstall of the WINCC instance.
How do I install the SQL Desktop Engine manually before WinCC Flexible?
From the WinCC Flexible DVD, run setup.exe from the MSDE\DISK1\MSDE subdirectory with the parameters SAPWD="YourStrongPassword" INSTANCENAME="WINCCFLEXIBLE" SECURITYMODE=SQL DISABLENETWORKPROTOCOLS=0. The password must contain upper, lower, digit, and symbol characters and be at least 8 characters long. Verify the install with osql -S .\WINCCFLEXIBLE -U sa -P YourStrongPassword -Q "SELECT @@VERSION", then run the WinCC Flexible setup with the SQL component deselected in the Custom Installation view.
Does WinCC Flexible require the Microsoft Message Queuing service on Windows?
Yes. Both MSDE 2000 and SQL Server 2005 Express require the Microsoft Message Queuing service for asynchronous trigger execution and the replication services used by WinCC Flexible's alarm and recipe logging. Install MSMQ via Control Panel → Add/Remove Windows Components → Message Queuing Server. Verify with sc query msmq returning STATE: 4 RUNNING before launching the WinCC Flexible install.