1. Overview: Why WinCC V6.2 SP2 Cannot Start Without the WinCC SQL Instance
Siemens WinCC V6.2 SP2 is the second service pack of the WinCC V6.2 SCADA/HMI runtime line. Internally, the WinCC archive database, the user administration database, the message and tag logging system, and the redundancy/partner-station configuration all rely on Microsoft SQL Server 2005 Express Edition bound to a fixed named instance. Unlike generic SQL Server 2005 installations, the runtime must use the instance that WinCC itself creates during its own setup routine. This requirement is documented in the Siemens Industry Online Support entry "Why can't you install the SQL server from WinCC V6.2?" (SIOS 30576253): the SQL Server 2005 Express can only be installed from the WinCC V6.2 / V6.2 SP2 setup media because only the WinCC setup provisions the correct instance name, the correct service accounts, and the matching SQL_Latin1_General_CP1_CI_AS collation expected by the WinCC project database.
If a workstation contains a stray SQL Server 2000 "WinCC" instance from a previous WinCC V6.0 installation, or if a developer tries to install WinCC V6.2 SP2 on top of a workstation that has a manually installed SQL Server 2005 with a different default instance (MSSQLSERVER), the WinCC setup will detect the conflict, abort, and the project will subsequently fail to open with one of the documented SQL connection error dialogs.
This article documents the correct install order, the required instance name, the registry keys that the WinCC setup writes, the exact error texts produced by the project-opener, and the field-proven procedure for repairing a broken SQL configuration without re-imaging the engineering station.
2. Product and Version Matrix
The dependency chain between WinCC and SQL Server is version-locked. Mixing the wrong components will produce the symptoms described later in the troubleshooting matrix.
| WinCC Version | Required Database | Instance Name | SQL Service Account | Collation |
|---|---|---|---|---|
| WinCC V6.0 / V6.0 SP1 | MSDE 2000 / SQL Server 2000 | WinCC | Local System | SQL_Latin1_General_CP1_CI_AS |
| WinCC V6.2 (no SP) | SQL Server 2005 Express | WinCC | Local System / NTAUTHORITY\SYSTEM | SQL_Latin1_General_CP1_CI_AS |
| WinCC V6.2 SP2 | SQL Server 2005 Express (SP-level matched to WinCC CD) | WinCC | Local System / NTAUTHORITY\SYSTEM | SQL_Latin1_General_CP1_CI_AS |
| WinCC V6.2 SP3 | SQL Server 2005 Express | WinCC | Local System / NTAUTHORITY\SYSTEM | SQL_Latin1_General_CP1_CI_AS |
| WinCC V7.0 | SQL Server 2005/2008 Express | WinCC | Local System | SQL_Latin1_General_CP1_CI_AS |
3. Prerequisites
Before starting the install/repair procedure, verify the following on the engineering station:
- Operating system: Windows XP Professional SP2/SP3, Windows Server 2003 SP1/SP2, or Windows XP Embedded (industrial PCs). WinCC V6.2 SP2 is not certified on Windows Vista or later; for those OS targets, upgrade to WinCC V7.0 or V7.0 SP1.
-
Administrator account: The setup must run under a local administrator or a domain account that is a member of the local
Administratorsgroup. The SQL service is installed to run asNTAUTHORITY\SYSTEM, but the WinCC setup writes registry and file-system ACLs that require elevation. - Disk space: Minimum 1.5 GB free on the system drive for WinCC plus the SQL Server 2005 Express payload; another 2 GB free on the data drive if tag logging archives are configured to a non-system location.
-
Pre-existing SQL instances: Verify that no MSSQLSERVER default instance from SQL Server 2005 is present, and that no
WinCCinstance from a previous SQL Server 2000 install is present. OpenSQL Server Configuration Manager→ SQL Server 2005 Services and inspect the right pane; the only SQL-related service that should be present after a clean install isSQL Server (WinCC)with start type Automatic. - WinCC V6.2 SP2 installation media: The full DVD or the licensed download from SIOS, including the SQL Server 2005 Express Edition (WinCC instance) component. The standalone Microsoft SQL Server 2005 Express redistributable does not contain the WinCC instance provisioning logic and will not satisfy the dependency.
4. Correct Installation Order
Siemens SIOS 30576253 explicitly states that the SQL Server must be installed from the WinCC V6.2 / V6.2 SP2 setup. The correct sequence is therefore:
- Boot the engineering station. Confirm no other SQL Server 2005 instance is running.
- Insert the WinCC V6.2 SP2 DVD (or mount the ISO).
- Run
Setup.exefrom the DVD root. The setup detects the absence of a WinCC instance and prompts to install the prerequisite SQL Server 2005 Express Edition (WinCC). - Accept the prerequisite prompt. The setup provisions the
WinCCnamed instance, applies the required collation, and sets the service account toLocal System. - Continue the WinCC setup and select the components (WinCC Explorer, Graphics Designer, Tag Logging, Alarm Logging, User Administrator, etc.).
- Reboot when prompted. The service
SQL Server (WinCC)must be in state Running before the first WinCC Explorer launch.
SQLEXPRESS or MSSQLSERVER before running the WinCC setup. The WinCC setup will then refuse to install its own WinCC instance and abort with error 1903 or with a "MS SQL Server 2005 Express not installable" message. The repair path is to uninstall the generic SQL Server 2005 first (via Add/Remove Programs, then remove the residual C:\Program Files\Microsoft SQL Server directory and the HKLM\SOFTWARE\Microsoft\Microsoft SQL Server registry hive), then re-run the WinCC setup.
5. SQL Server 2005 WinCC Instance Anatomy
After a clean WinCC V6.2 SP2 install, the following artifacts are created on the engineering station. Use this checklist to verify the install was successful before opening any project.
| Artifact | Path / Key | Expected Value |
|---|---|---|
| SQL instance name | SQL Server Configuration Manager → SQL Server 2005 Services | SQL Server (WinCC) |
| Service binary | C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\sqlservr.exe |
SQL Server 2005 Express (build 9.0.xxxx) |
| Data directory | C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data |
Contains master.mdf, model.mdf, tempdb.mdf, msdbdata.mdf plus WinCC system DBs |
| WinCC system databases |
CC_MAINT_<projectname>, CC_ALG_<projectname>, CC_TLG_<projectname>
|
Created on first project open / runtime start |
| Registry key | HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\WinCC\MSSQLServer\SuperSocketNetLib\Tcp |
Port 1433 enabled, listen all YES |
| Service account | SQL Server (WinCC) → Properties → Log On | Built-in account: Local System |
| Startup type | SQL Server (WinCC) → Properties → Service | Automatic |
| Collation | Query: SELECT SERVERPROPERTY('Collation')
|
SQL_Latin1_General_CP1_CI_AS |
6. Documented Project-Open Error Dialogs
-
Error 1001 / "Cannot load database DLL" — raised by the WinCC project opener when the OLE DB provider cannot connect to the
WinCCinstance. Typical cause: theSQL Server (WinCC)service is stopped, or the named-pipes protocol is disabled. -
"Connection to database WinCC failed" / "General SQL error" — raised by CCArchiveConn when the connection string
Provider=MSOLEDBSQL;Data Source=localhost\WinCC;Initial Catalog=master;Integrated Security=SSPI;cannot authenticate. Typical cause: the SQL service is running as Network Service instead of Local System, or SPNs are missing in a domain environment. - "The WinCC instance of MS SQL Server is not installed" — raised by the WinCC setup bootstrap when the prerequisite check fails because a non-WinCC SQL Server 2005 instance blocks the install. Resolved by removing the foreign instance.
- Event Viewer Application log: Event ID 18456, Severity 14, State 38 — "Login failed for user 'NT AUTHORITY\SYSTEM'. Reason: Failed to open the explicitly specified database." Typical cause: the database files for the WinCC project were created under a different service account in a prior install and the ACLs are no longer readable by SYSTEM.
7. Step-by-Step Repair Procedure
The following procedure restores a WinCC V6.2 SP2 station that opens projects with a SQL connection error. It is written to preserve any existing WinCC projects in C:\Program Files\Siemens\Automation\WinCC\WinCCProjects while repairing the SQL layer.
7.1 Stop the WinCC runtime and Explorer
- Close WinCC Explorer and any open Graphics Designer / Tag Logging editor windows.
- Open Services (
services.msc) and stop the services in this order:SIMATIC WinCC Explorer→CCArchiveManager→SQL Server (WinCC). - Confirm the
SQL Server (WinCC)service is in state Stopped.
7.2 Verify the SQL instance is the WinCC instance
- Open a command prompt and run:
sc query | findstr /I "sql" - The output must show exactly one service whose display name is
SQL Server (WinCC). If any other SQL service is present, the system is contaminated; jump to Section 7.5 (Re-provision from WinCC setup).
7.3 Reset the SQL service to Local System
- In Services, open
SQL Server (WinCC)→ Log On tab. - Select Built-in account: Local System. Click OK.
- Do not enter a domain account here; WinCC V6.2 SP2 ships with Local System as the documented service account.
7.4 Reset database file ACLs
Database file ACLs sometimes become unreadable to SYSTEM after a backup/restore or after a manual copy of the data directory. Reset them as follows:
- Open a command prompt as Administrator.
- Run:
icacls "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data" /T /C /grant "NT AUTHORITY\SYSTEM:(OI)(CI)F" "BUILTIN\Administrators:(OI)(CI)F" - Confirm "Successfully processed X files; Failed processing 0 files."
7.5 Re-provision the SQL instance from the WinCC setup
- Open Control Panel → Add/Remove Programs.
- Select Siemens HMI WinCC V6.2 SP2 → Change.
- In the WinCC setup dialog, select Modify and ensure the component MS SQL Server 2005 Express Edition (WinCC instance) is checked. If it is already checked, uncheck it, complete the modify to remove, then re-run the setup and check it again to re-install.
- The setup re-installs the
WinCCinstance, registers the service, and rewrites the registry keys listed in Section 5. - Reboot the station.
7.6 Re-create the WinCC project databases
If a project still fails to open after Sections 7.1–7.5:
- Open SQL Server Management Studio Express (installed by the WinCC setup as a separate component, SQL Server 2005 SSMSE).
- Connect to
localhost\WinCCwith Windows Authentication. - Right-click Databases → New Database and create the three project databases expected by WinCC:
CC_MAINT_<ProjectName>,CC_ALG_<ProjectName>,CC_TLG_<ProjectName>(WinCC will populate them on first runtime activation, but pre-creating them resets the ACLs to the LocalSystem owner). - Close SSMSE and re-open the WinCC project in WinCC Explorer.
8. Verification
After completing the repair procedure, verify the install in the following order. Each step must pass before moving to the next.
-
Service check: In services.msc,
SQL Server (WinCC)is Started, Automatic, and logged on as Local System. -
Port check: From a command prompt, run
netstat -ano | findstr :1433. A line with state LISTENING must be present. (If a firewall blocks 1433 to localhost, WinCC still works locally; if WinCC is the OPC server for a remote client, port 1433 must be open between the two hosts.) -
Connectivity check: In SSMSE,
localhost\WinCCconnects with Windows authentication. RunSELECT @@VERSION— expected return begins with Microsoft SQL Server 2005 - 9.00.xxxx. -
Collation check: Run
SELECT SERVERPROPERTY('Collation'). Expected return:SQL_Latin1_General_CP1_CI_AS. - Project open: Launch WinCC Explorer, open the project, and confirm the project tree loads without a SQL error dialog. Activate the project to Runtime; the Event Viewer Application log must contain no Event ID 18456 entries.
- Archive write: In runtime, write a tag whose archive is enabled. Open the Tag Logging editor, view the archive, and confirm a row is written. This proves the WinCC-to-SQL write path is functional end-to-end.
9. Troubleshooting Matrix
| Symptom | Probable Root Cause | Diagnostic | Corrective Action |
|---|---|---|---|
| Setup aborts with "MS SQL Server 2005 Express Edition (WinCC) could not be installed" | A foreign SQL Server 2005 default instance (MSSQLSERVER) is present and blocks the WinCC instance | Check sc query | findstr sql for a non-WinCC SQL service |
Uninstall the foreign SQL Server 2005, delete the data directory, remove the HKLM\SOFTWARE\Microsoft\Microsoft SQL Server hive, re-run WinCC setup |
| Setup aborts with "The WinCC instance of MS SQL Server is not installable" | A pre-existing WinCC named instance from SQL Server 2000 conflicts |
Open SQL Server Configuration Manager → SQL Server 2005 Services; look for SQL Server (WinCC)
|
Uninstall the SQL Server 2000 WinCC instance via Add/Remove Programs; re-run the WinCC V6.2 SP2 setup |
| Project open error: "Connection to database WinCC failed" | SQL service is not running, or is running as a wrong account | services.msc → SQL Server (WinCC) → Log On tab | Set the service to Local System, start it, retry |
| Project open error: Event ID 18456, State 38 | Database files have ACLs incompatible with LocalSystem | icacls on the SQL data directory | Reset ACLs per Section 7.4 |
| Project open error: "Cannot load database DLL" | Named-pipes or TCP protocol is disabled on the SQL instance | SQL Server Configuration Manager → Protocols for WinCC | Enable Named Pipes and TCP/IP, restart the service |
| Archive data does not persist after runtime restart | Project databases were never created or are detached | SSMSE → Databases, look for CC_ALG_<projectname> | Re-create per Section 7.6; restart runtime |
| Cannot create a new project | Setup never finished provisioning the SQL instance | Look for SQL Server (WinCC) in services |
Re-run setup, repair mode, ensure the SQL prerequisite is checked |
| Project runs locally, OPC client cannot read tags remotely | Firewall blocks TCP 1433; SPNs missing for Kerberos | netstat -ano from remote host; setspn -L <serviceaccount>
|
Open 1433 inbound; register SPN MSSQLSvc/<host>:1433 for the SQL service account |
10. Field-Proven Caveats
- Do not apply Windows service packs blindly. Windows XP SP3 and Server 2003 SP2 are tested; installing the SQL Server 2005 SP3 rollup on top of WinCC's bundled Express instance is supported, but applying SQL Server 2005 CU patches released after the WinCC CD cut-off can break the WinCC instance if the patch re-runs the upgrade script against the WinCC system DBs.
-
Antivirus exclusion. Real-time AV scanning of the SQL data directory (
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data) and of the WinCC project directory degrades archive writes and may cause spurious Event ID 17055 errors. Exclude these paths in the AV policy. - UAC on Windows XP Embedded. If the engineering station runs the Windows XP Embedded variant, confirm that the WinCC setup was launched with the Run as option, even though UAC is not present; this ensures the registry ACLs are written to the local Administrators group and not to a single user.
- Domain vs. local account. The WinCC V6.2 SP2 setup does not provision a domain account for the SQL service. If the station is later joined to a domain, re-validate the service account; never let a GPO override the SQL service logon.
- Port collision. A custom WinCC OPC server on TCP 1433 can conflict with the SQL listener. Change the WinCC SQL instance to a non-default port only if you have explicit Siemens approval, because WinCC's internal connection strings assume the default port.
11. When to Upgrade Instead of Repair
Repair is the right call when the SQL layer is intact but misconfigured, when the database files are recoverable, and when the engineering station runs a supported OS. Upgrade is the right call when:
- The workstation has been migrated to Windows 7 / Server 2008 R2 / later — WinCC V6.2 SP2 is not certified for those OS versions; move to WinCC V7.0 SP3 or WinCC V7.2 with their corresponding SQL Server 2008 / 2012 instances.
- The project exceeds 64,000 tags or 4,000 archived tags — WinCC V6.2 SP2 is a 64k-tag product; the licensed V6.2 SP2 PowerPacks lift the limit only on V6.2 SP2 itself, not on later versions.
- Long-term support is required. Siemens support for V6.2 SP2 ended in 2011; current SIOS entries for V6.2 are limited to legacy customer access.
12. Frequently Asked Questions
Where do I obtain the SQL Server 2005 Express Edition that WinCC V6.2 SP2 requires?
It is not a separate download. The WinCC V6.2 SP2 setup media itself provisions the SQL Server 2005 Express "WinCC" named instance. As documented in SIOS entry 30576253, you must run the WinCC setup and accept the prerequisite prompt; the standalone Microsoft SQL Server 2005 Express redistributable will not create the WinCC instance.
My laptop has a SQL Server 2000 "WinCC" instance left over from WinCC V6.0 — can WinCC V6.2 SP2 use it?
No. The V6.0 "WinCC" instance runs the SQL Server 2000 engine, which V6.2 SP2 cannot attach to. Uninstall the SQL Server 2000 "WinCC" instance, then run the WinCC V6.2 SP2 setup so it provisions a fresh SQL Server 2005 Express "WinCC" instance.
Which service account should the "SQL Server (WinCC)" service use?
Built-in account: Local System (NTAUTHORITY\SYSTEM). Do not change it to a domain account unless Siemens support explicitly directs you to, and never let a group policy override the SQL service logon.
What collation must the WinCC SQL instance have?
SQL_Latin1_General_CP1_CI_AS. Verify with SELECT SERVERPROPERTY('Collation') in SSMSE. A different collation (for example the default SQL_Latin1_General_CP1_CI_AS of an English Windows install is correct, but a Chinese, Japanese, or Cyrillic install defaults to a different collation) will cause the WinCC project opener to fail with a general SQL error.
WinCC Explorer opens but the project archive does not write — what should I check?
Confirm the three project databases (CC_MAINT_<ProjectName>, CC_ALG_<ProjectName>, CC_TLG_<ProjectName>) exist in SSMSE under the WinCC instance, that their owner is sa, and that the data drive hosting \MSSQL.1\MSSQL\Data has at least 2 GB free. Also confirm that real-time antivirus is not scanning the data directory.