Resolving WinCC Compile OS Error 302:1100 and Internal Error 2025
The Compile OS (302:1100) failure with Internal Error 2025 and the downstream "Error while requesting messages from the STEP 7 message server" (API: MServer:MSS_GetAlarmNext Ret=-1 Err1=0x19) is one of the most common blocking faults encountered when a WinCC or PCS 7 OS project is moved between engineering stations, duplicated, or compiled on a workstation whose hostname no longer matches the configuration stored inside the project. The error halts OS compilation entirely, prevents the runtime database from being regenerated, and leaves the operator station unable to start. The error string "An internal database error occurred on ''" with an empty server name field is the diagnostic fingerprint of a SQL/Messaging backbone that is still trying to reach a host that no longer exists on the network or in DNS.
MyMultiProject/ProjectOS/OS1/WinLCApplication/OS1).1. Problem Summary
When the engineer right-clicks the OS in the SIMATIC Manager Component View and selects Compile OS, the compiler aborts immediately with the dialog shown below. The compile log contains the following two diagnostic lines:
*** Error(s) ***: An internal error occurred. Error number: 2025
*** Error(s) ***: Error while requesting messages from the STEP 7 message server.
(ApiFunc=MServer:MSS_GetAlarmNext Ret=-1 Err1=0x19
<An internal database error occurred on ''.>)
A secondary symptom is reported the first time the OS object is opened after the failure: WinCC Explorer (s7omwinx.exe) prompts:
The configured server is not available. Do you want to open the project with the local computer as a server?
Selecting Yes allows the project to be opened locally, but the subsequent Compile OS still terminates with error 2025, and the alarm/message subsystem is non-functional. The pattern is consistent with a project that was created on one engineering station (the "original server") and is now being maintained on a different host whose NetBIOS name does not match the value baked into the project database.
2. Error Code Reference
| Field | Value | Meaning |
|---|---|---|
| Compile dialog | 302:1100 | OS compiler exit code returned by s7otcnfx.exe (s7omcnv) on a fatal internal exception during message-server access. |
| Internal error | 2025 | WinCC internal: the message/text library server (MSS) call chain returned an unhandled exception while iterating alarm/message rows. |
| API function | MServer:MSS_GetAlarmNext | STEP 7 message-server enumeration call used to walk configured message/operator-control rows before code generation. |
| Return value | Ret = -1 | API-level failure flag returned by the message server proxy. |
| Extended code | Err1 = 0x19 (decimal 25) | SQL Server native error class: "An internal database error occurred" — typically raised when the SQL service cannot resolve the configured instance or the database file is locked by another host. |
| Empty server token | '' | The error text contains an empty server name. This is the diagnostic signature that the configured WinCC server name does not exist in the project registry (i.e. it has been replaced with a blank string, a stale GUID, or an unreachable host). |
3. Root Cause Analysis
The OS compile pipeline depends on three coupled subsystems:
- STEP 7 Message Server (MSS) — a Windows service that brokers message text and alarm row access between the SIMATIC Manager, the OS compiler, and the WinCC runtime database.
- Microsoft SQL Server (WinCC instance) — the relational store that hosts the WinCC project, alarm logging, and tag persistence. PCS 7 / WinCC install a named SQL instance whose service account is bound to the local computer's NetBIOS name at install time.
- WinCC Server Name property — a project-level property stored in the OS database that names the computer expected to host the runtime; the OS compile writes connection strings that include this name.
If any one of these three subsystems disagrees with the others, the compile fails with the symptoms described. The most frequent root causes observed in the field are:
-
Hostname change after WinCC/PCS 7 install. Renaming the Windows computer (System Properties → Computer Name) after the WinCC SQL instance is bound invalidates the SQL service principal names (SPNs) and the service-account ACLs. SQL Server refuses to start its named instance, and the message server can no longer authenticate, producing
Err1=0x19. -
Project moved to a different engineering station. The OS project retains the source station's computer name in its Computer property. The new station cannot resolve the original server name;
MServer:MSS_GetAlarmNexttherefore returnsRet=-1against an empty server token. - Local SQL Server (MSSQL$WINCC) is stopped or its startup account is broken following a Windows feature update, a domain policy change, or removal of the local SIMATIC HMI / SIMATIC NET user group.
-
DCOM / RPC permissions on the message server have been reset by a Group Policy push, preventing remote procedure calls into
s7ommssx.dllor the SQL native client.
4. Preconditions Before Troubleshooting
Before changing configuration, capture a clean baseline:
- Open Computer properties in SIMATIC Manager, expand the OS, and screenshot the Computer Name field on the General tab.
- Open Start → Control Panel → System (or
sysdm.cpl) and note the Full computer name. Compare against the WinCC property from step 1. - Open SQL Server Configuration Manager and verify the
MSSQL$WINCCservice is running. Capture the service account (typicallySYSTEMorNT AUTHORITY\SYSTEMfor local installations). - From an elevated command prompt run
hostnameandsc query "MSSQL$WINCC". The two outputs are needed when reviewing the SQL SPNs withsetspn -L <hostname>. - Export the affected project: in SIMATIC Manager, choose File → Archive and create a
.ziparchive. Never troubleshoot a WinCC/PCS 7 OS project from the only copy.
5. Step-by-Step Resolution
Apply the steps in order. Stop at the first one that produces a clean Compile OS success.
5.1 Confirm the user context has administrator rights
WinCC/PCS 7 OS compile requires the SIMATIC Manager to launch helper services (MSS, SQLWriter, CCAgent) under an account that owns the project directory and the SQL database files. Run SIMATIC Manager as Administrator (right-click → Run as administrator). If the project is hosted on a UNC path, the user must also have Full Control on the share's NTFS ACL. This is the cheapest fix and resolves roughly 30 percent of "configured server is not available" prompts.
5.2 Re-point the WinCC server name to the local computer
- In the Component View, expand the OS project and right-click the Computer node (for example OS1 or the
WinLCApplicationobject). - Select Properties.
- On the General tab, replace the value in the Computer Name field with the local workstation's NetBIOS name exactly as returned by
hostname(do not include the FQDN; WinCC expects the short name). - Click OK and allow SIMATIC Manager to rewrite the project database.
- Close WinCC Explorer (
s7omwinx.exe) completely; the running process caches the old server name. - Reopen the OS and trigger Compile OS. The 302:1100 dialog should be replaced by a clean compile log.
This is the documented Siemens-recommended first action; it corresponds to the procedure in Siemens Support Entry ID 5708281 for WinCC computer name reassignment after project migration.
5.3 Validate and restart the SQL Server WinCC instance
If step 5.2 still returns Err1=0x19, the WinCC SQL instance is no longer reachable. Recover it before re-attempting the compile:
- Open Services (
services.msc) and locate SQL Server (WINCC). - If the service is stopped, attempt a manual start. A failure with "The service did not start due to a logon failure" indicates that the service account password is out of sync with the local SAM database — typically because the host was renamed or rejoined to a domain.
- Open SQL Server Configuration Manager → SQL Server Services, right-click the WINCC instance, and choose Properties → Log On. Re-enter the credentials (or set the service to
NT AUTHORITY\SYSTEMfor a local-only install) and apply. - Restart the service and verify with
sc query "MSSQL$WINCC"that theSTATEreportsRUNNING. - Re-run Compile OS.
5.4 Re-register the STEP 7 Message Server service
The MSS service is implemented in s7omsrsx.exe / s7ommssx.dll. Corruption of its DCOM registration or a stale service entry produces the same MSS_GetAlarmNext Ret=-1 symptom. Repair it as follows:
- From an elevated command prompt, run
regsvr32 /u "C:\Program Files (x86)\Siemens\Automation\WinCC\bin\s7ommssx.dll"and thenregsvr32 "C:\Program Files (x86)\Siemens\Automation\WinCC\bin\s7ommssx.dll". Adjust the path for your WinCC version (V7.4+ is typicallyC:\Program Files\Siemens\Automation\WinCC\bin\; PCS 7 V9.0+ uses the same root). - Restart the SIMATIC Message Service and the S7Omsr Service from
services.msc. - Verify the DCOM application {xxx-xxx} Siemens Message Server is reachable with
dcomcnfg→ Component Services → Computers → My Computer → DCOM Config. End-point and launch permissions must include the engineering user account and the SIMATIC HMI local group.
5.5 Reinstall the WinCC SQL Server instance (last resort)
If the SQL instance is corrupted beyond recovery — typically after a Windows host rename — a full reinstall of the WinCC-shipped SQL instance is required. This is the procedure referenced in Siemens Support Entry 5708281 for cases where the computer name was changed after the initial WinCC install.
- Close all SIMATIC applications and stop the WinCC SQL service.
- Insert the WinCC / PCS 7 installation media and run Setup.exe with administrator rights.
- Choose Modify Installation and uncheck SQL Server to remove the existing instance. Complete the wizard and reboot.
- Re-run Setup.exe and add the SQL Server component back. The installer detects the new computer name and re-binds the SQL service account and SPNs correctly.
- Reboot. Verify
sc query "MSSQL$WINCC"reportsRUNNINGand thathostnamematches the WinCC Computer Name property from step 5.2. - Reopen the multi-project and run Compile OS.
6. Verification
After each remediation step, perform the following checks before declaring the fault cleared:
- Open the OS in Component View. The dialog "The configured server is not available" must no longer appear.
- Trigger Compile OS → Entire OS. The compile log must end with
*** Compile completed successfully ***and no*** Error(s) ***lines. - Open the generated runtime files (
*.RTin the projectwincprojpath) and confirm the server name resolves vianslookup <servername>orping <servername>on the engineering network. - Start WinCC Runtime from the OS project. The Alarm Logging control must populate without "Database not available" warnings.
- Generate a forced alarm from the AS (PLC) and confirm it appears in the WinCC alarm view with the correct message text, timestamp, and status. This proves the
MServer:MSS_GetAlarmNextchain is functioning end-to-end.
7. Diagnostic Commands and Log Locations
| Item | Path / Command |
|---|---|
| Compile log | Project path → wincproj\<OS name>\<computer name>\CompileLog.txt
|
| WinCC diagnostic files | C:\ProgramData\Siemens\Automation\Logfiles\ |
| MSS trace | Enable via SIMATIC Manager → Options → Message Service → Trace; output to %TEMP%\s7ommss.trc
|
| SQL Server errorlog | C:\Program Files (x86)\Microsoft SQL Server\MSSQL.WINCC\MSSQL\Log\ERRORLOG |
| Computer name check |
cmd /c hostname and cmd /c systeminfo | findstr /C:"Host Name"
|
| Service status |
sc query "MSSQL$WINCC", sc query "s7omsrs", sc query "s7ommss"
|
| SPN enumeration |
setspn -L <hostname> — must include MSSQLSvc/<hostname>:<instance>
|
| DCOM permission |
dcomcnfg → Component Services → Computers → My Computer → DCOM Config
|
8. Related Error Codes and Edge Cases
| Symptom | Likely Co-cause | Remediation |
|---|---|---|
Compile error 302:1100, Err1=0x19, no server name |
Server name mismatch (this article) | Step 5.2; repoint to hostname
|
Compile error 302:1100, Err1=0x40
|
SQL database file locked by another process or corrupted | Restart SQL service; check for orphaned .mdf/.ldf handles |
Compile error 302:1100, Err1=0x5
|
Access denied to SQL database | Grant engineering user db_owner on the WinCC project database |
| "The configured server is not available" dialog | Computer name property not aligned with local host | Step 5.2 |
| OS opens locally but alarms are blank at runtime | Message server reachable, but alarm logging DB is detached | Re-attach DB via SQL Management Studio → WinCC → Attach |
| Compile succeeds on one OS, fails on a second OS in the same multi-project | Second OS still points to original server name | Apply step 5.2 to every OS in the project tree |
| SQL Server (WINCC) service fails to start after Windows 10 feature update | Service account orphaned by update | Step 5.3 — re-enter credentials in SQL Configuration Manager |
9. Preventive Measures
- Never rename a WinCC/PCS 7 engineering station after install. If a rename is unavoidable, plan for the SQL instance reinstallation described in step 5.5 before changing the computer name.
- Always run SIMATIC Manager as Administrator. Configure the shortcut with the Run this program as an administrator compatibility property.
-
Pin the SQL service startup to Automatic (Delayed Start). This avoids race conditions with the
s7omsrsservice during boot. -
Document the WinCC Computer Name property in the project's naming convention. A project delivered from the engineering pool should have its Computer Name set to
%COMPUTERNAME%at retrieval time, not frozen at the source station's name. -
Exclude the WinCC project directory and SQL data directory from antivirus real-time scanning. AV file locks on
*.mdf/*.ldfand*.RTfiles are a common silent contributor toErr1=0x19. -
Back up the SQL WinCC databases before any host rename or domain rejoin. Use
SQL Management Studio → Tasks → Back Up for each WinCC-related database.
10. Frequently Asked Questions
What does WinCC Compile OS error 302:1100 mean?
It is the OS compiler's generic fatal-exit code returned when a downstream subsystem — typically the STEP 7 message server or the WinCC SQL instance — fails to respond during message enumeration. In this case the message server returned Ret=-1 with extended code 0x19 (internal database error), so the compile aborts before any runtime files are produced.
Why does Internal Error 2025 appear with an empty server name in the message text?
Empty server name in Err1=0x19 <An internal database error occurred on ''.> indicates the WinCC Computer Name property in the OS no longer matches any reachable host, typically because the project was moved from another engineering station or the local computer was renamed. Correcting the Computer Name to the local hostname (step 5.2) resolves it.
Do I have to reinstall the WinCC SQL Server to fix this?
Not in most cases. Steps 5.1 through 5.4 (run as administrator, repoint the computer name, restart the SQL service, re-register the message server) resolve the majority of occurrences. Only perform a SQL instance reinstall (step 5.5) when the host was renamed after the original WinCC install and the service account SPNs are unrecoverable, per Siemens Support Entry 5708281.
Can the project be opened on a workstation without a local WinCC SQL Server?
WinCC Runtime requires a local SQL instance, but OS editing is possible against a remote SQL host if the WinCC project is configured to point to that remote instance. For pure offline editing (no compile), you can open the project with the "open with the local computer as a server" prompt, but Compile OS will still fail until a valid SQL instance is reachable from the engineering station.
How do I prevent this fault after a Windows or PCS 7 version upgrade?
Re-validate the Computer Name property of every OS object in the multi-project after the upgrade, run the SIMATIC Message Service and MSSQL$WINCC services under a domain account whose password is not subject to local-SAM drift, and keep the engineering user in the local SIMATIC HMI group. Always rebuild the multi-project archive after the upgrade so the SQL SPNs are refreshed.