Problem Overview
Operators running WinCC TIA Portal Professional V11 SP2 on Windows 7 Ultimate report that the trend control in runtime displays no historical data when panning back in time. The trend curve is empty, no archive segments are present, and the control behaves as if the logging service never started. Investigation of the WinCC Alarm Logging window reveals two related redundancy errors emitted at the same timestamp:
-
1012240 —
REDRT: "<COMPUTERNAME>": RedundancyControl Error Application Health Check in CCDmRtServer_Sync causes state switch. -
1012241 —
REDRT: "<COMPUTERNAME>": RedundancyControl: Switchover to status Fault.
Both messages originate from the CCDmRtServer_Sync component, the WinCC RT Professional change-and-distribution server that synchronizes the in-memory process value buffer to the SQL-based logging database. When the health check inside this service fails, the redundancy control state machine transitions to Fault, the data logging service stops writing new records, and existing buffered segments are flagged as invalid. Trend controls that were never re-opened with a fresh connection then render the archive as empty.
Affected Environment
| Item | Value |
|---|---|
| Engineering software | SIMATIC WinCC Professional V11 SP2 (TIA Portal) |
| Runtime | WinCC RT Professional (RT Pro) V11 SP2 |
| Operating system | Windows 7 Ultimate (32/64-bit) |
| Project origin | Possible migration from WinCC V7.0 to WinCC V11 |
| SQL Server (logging) | SQL Server 2008 R2 / 2012 Express bundled with WinCC |
| Database instance | WinCC_Instance_<n> (default: CC_INSTANCE_1) |
| Failing component | CCDmRtServer_Sync.exe |
The same error pattern has been observed on V13 SP1 and V14 environments where the logging database has been detached, the log path is read-only, or the SQL Server service is running under an account without write permission to the archive directory. TIA Portal V11 is end-of-life, so many of the remedies require manual configuration because automated firmware update paths no longer exist.
Error Code Reference
1012240 — RedundancyControl Error Application Health Check
Emitted by the WinCC redundancy control when an internal application health probe returns a non-zero status. The probe polls a defined set of internal services at a configurable interval. A non-zero return from CCDmRtServer_Sync indicates that the change-and-distribution server cannot complete a database transaction within the timeout window.
1012241 — RedundancyControl Switchover to status Fault
Emitted when the redundancy control state machine transitions from Primary or Standby into Fault. In a single-node (non-redundant) runtime, this is a fatal state: the data logging service is suspended and the trend control cannot acquire new archive segments. The state can only be cleared by restarting the WinCC Runtime.
| Code | Class | Component | Severity | Action |
|---|---|---|---|---|
| 1012240 | REDRT | RedundancyControl | Warning | Investigate CCDmRtServer_Sync health |
| 1012241 | REDRT | RedundancyControl | Error | Restart WinCC Runtime, verify DB |
Root Cause Analysis
Five root causes are observed in the field, listed in order of frequency:
-
SQL Server service not running or in recovery state. After a Windows update, the SQL Server (
WINCCPLUS) instance may be stuck in Recovery Pending or Suspect. TheCCDmRtServer_Synccannot open a session and the health check fails. -
Archive path read-only or out of disk space. The default archive path
C:\ProgramData\Siemens\Automation\WinCC\<ProjectName>\Archives\(Windows 7:C:\Documents and Settings\All Users\Application Data\Siemens\...) must be writable by the user account running the SQL Server service and by the WinCC Runtime service. - Project migration residue from WinCC V7. When a V7 project is imported into V11 via the TIA migration tool, the database name and connection parameters are sometimes carried over with the old instance name. The V11 runtime then attempts to connect to a non-existent SQL instance and the health check fails within seconds.
- Trend control configured to a non-existent archive tag. A renamed or deleted process tag referenced in the trend control causes the segment request to return zero rows; the trend view appears empty even though the logging system is healthy.
-
Antivirus or backup software locking the SQL data files (
.mdf,.ldf) during a snapshot. This blocks the checkpoint operation and theCCDmRtServer_Synchealth probe times out.
MSSQL$WINCCPLUS before assuming a WinCC configuration issue. SQL-level errors cascade into 1012240/1012241 within seconds.Data Logging Architecture (RT Professional)
RT Professional uses a three-layer logging model documented in the WinCC Data Logging (RT Professional) manual. Understanding these layers clarifies where 1012240 originates.
- Process value buffer (in-memory) — the runtime caches the current value of every archived tag. The buffer is sized by the "Acquisition cycle" and the "Logging cycle" on the tag configuration.
-
CCDmRtServer (change-and-distribution server) — consumes the in-memory buffer, evaluates trigger conditions, and prepares the segment payload.
CCDmRtServer_Sync.exeis the synchronization worker that pushes the prepared segment to the database. -
SQL Server (WinCC logging database) — persists the segment. Default instance name is
WINCCPLUS(TIA V11/V13) orWINCC_PRO_RT(TIA V14+). The schema contains the tablesdbo.PDL_<TagName>and the configuration tabledbo.MCPTArchive.
The application health check probed by the redundancy control includes a ping to CCDmRtServer_Sync. If the sync worker has not flushed a segment within the configured "Timeout for data logging" (default 30 s, parameter Logging.DmRt.SyncTimeout in the WinCC project file), the health check returns non-zero and 1012240 is raised. After three consecutive failures, the state machine moves to Fault and 1012241 is raised.
Diagnostic Procedure
Run the following steps in order. Each step verifies a single layer of the architecture.
Step 1 — Verify SQL Server is running
- Open Start → Administrative Tools → Services.
- Locate the service
SQL Server (WINCCPLUS)(orSQL Server (WINCC_PRO_RT)on V14+). - Status must be Running, Startup type Automatic.
- If stopped, right-click → Start. If it fails, check Event Viewer → Application for source
MSSQL$WINCCPLUS.
Step 2 — Confirm the logging database is online
Open SQL Server Management Studio (SSMS) and connect to localhost\WINCCPLUS using Windows authentication. Run:
SELECT name, state_desc FROM sys.databases WHERE name LIKE 'CC%' OR name LIKE 'WinCC%';
Expected output: one row with state_desc = ONLINE. If RECOVERY PENDING or SUSPECT, see the recovery section below.
Step 3 — Validate the archive path
- In the TIA project tree, open Runtime settings → Services → Data logging.
- Note the "Storage path" (default:
<ProjectPath>\Archive). - In Windows Explorer, right-click the folder → Properties → Security.
- Verify the user account that runs the SQL Server service and the WinCC Runtime service have Modify and Write permissions. On Windows 7, the typical account is
SYSTEMor the local user that started the service. - Confirm the drive has at least 10 % free space. SQL Server will not start a checkpoint if free space drops below its configured threshold.
Step 4 — Check for migration residue
- In TIA Portal, open the project and navigate to Project tree → Common data → HMI → Runtime settings → Services → Data logging.
- Expand "Database connection". Verify the instance name matches the installed SQL Server instance. If the project says
WINCCPLUSbut the installed instance isWINCC_PRO_RT(V14+ upgrade), the sync worker will fail to connect. - Click "Recreate database" to regenerate the schema with the correct instance name. This is non-destructive: existing data is re-attached.
Step 5 — Verify trend control configuration
- Open the screen containing the trend view.
- Right-click the WinCC Online Trend Control → Properties → Data Source.
- Verify the "Archive" dropdown shows the configured data log and the "Tag name" matches an existing process tag.
- If the dropdown is empty, the archive name was renamed during migration. Rename the archive back, or recreate the trend control with the new archive.
Step 6 — Inspect CCDmRtServer_Sync
Open Task Manager → Details. Confirm CCDmRtServer_Sync.exe is running. If absent, the WinCC Runtime was started before SQL Server was ready, or the service was blocked by antivirus. Add the WinCC install path to the antivirus exclusion list:
C:\Program Files\Siemens\Automation\WinCC RT Professional\
Solution
A. Recover the SQL logging database
- Stop the WinCC Runtime from the WinCC Explorer (or the system tray icon).
- Open SSMS, connect to
localhost\WINCCPLUS. - Run:
ALTER DATABASE [CC_Project_1] SET EMERGENCY; - Run:
ALTER DATABASE [CC_Project_1] SET SINGLE_USER; - Run:
DBCC CHECKDB ('CC_Project_1', REPAIR_ALLOW_DATA_LOSS); - Run:
ALTER DATABASE [CC_Project_1] SET MULTI_USER; - Restart the WinCC Runtime.
B. Reset the redundancy control state
- Stop the WinCC Runtime.
- Open Windows Services and restart
SIMATIC WinCC RT Professional. - Confirm the
REDRTalarm messages 1012240/1012241 do not reappear within 60 s. If they do, repeat Steps 1–5 of the diagnostic procedure.
C. Reconnect migrated projects
- In TIA Portal, open the project.
- Navigate to Runtime settings → Services → Data logging.
- Click "Disconnect database" and then "Reconnect database".
- Compile and download the project to the runtime PC.
D. Adjust the sync timeout (advanced)
If the SQL Server is correctly tuned but the application is large (more than 50,000 tags), the default 30 s timeout may be too short. Edit the file <ProjectName>.hmiscript in the runtime project directory and add:
Logging.DmRt.SyncTimeout = 90; // seconds
Recompile the project. This parameter is documented in the WinCC Data Logging (RT Professional) reference.
Verification
- Start the WinCC Runtime.
- Open the trend control, navigate to the current time, then pan back 1 hour.
- The trend curve must render historical data points.
- Open WinCC Alarm Logging and confirm no
REDRTmessages with code 1012240 or 1012241 are present in the last 10 minutes. - Insert a test value in the PLC and confirm it appears in the trend within one logging cycle.
- Run the SQL query
SELECT COUNT(*) FROM dbo.PDL_<TagName>;and confirm the row count is increasing.
CCDmRtServer_Sync must report zero failed probes for 10 consecutive minutes. Confirm with the WinCC Performance Viewer: "Data logging: segments flushed per minute" should be non-zero whenever archived tags are changing.Migration Considerations (WinCC V7 to V11)
Projects migrated from WinCC V7 to WinCC TIA V11 SP2 carry a structural risk: the V7 archive API used ODBC names like CC_V7DB_1, while V11 uses the SQL instance WINCCPLUS. The migration tool updates most references automatically, but two areas require manual review:
- Tag name length: V7 allowed up to 32 characters; V11 enforces 24 characters in some configurations. Truncated names break the trend control data source.
-
Archive configuration file: The V7
ArchiveManager.xmlis converted to V11 native, but custom trigger conditions written in VBScript must be re-validated against the V11 script engine.
After every migration, run the "Project consistency check" in TIA Portal (Project → Compiler → Check consistency) before downloading to the runtime.
Preventive Measures
- Configure a scheduled task that backs up the SQL logging database every 24 h using
sqlcmd -S localhost\WINCCPLUS -Q "BACKUP DATABASE [CC_Project_1] TO DISK='D:\Backup\<name>.bak'". - Monitor the
Logging.DmRt.SegmentsDroppedperformance counter with the WinCC Performance Viewer; a non-zero value indicates segment loss without an alarm. - Reserve 20 % free space on the archive drive to absorb burst traffic during recipe changes.
- Exclude the WinCC and SQL Server directories from real-time antivirus scanning.
- Update to the latest TIA Portal version currently in general support. V11 reached end-of-life in 2014 and is not covered by Siemens security patches.
Related WinCC Alarm Codes
| Code | Message prefix | Meaning | Resolution |
|---|---|---|---|
| 1000209 | DB | Database connection lost | Check SQL Server service, network |
| 1000300 | CCRtServer | Runtime server not started | Restart WinCC Runtime |
| 1012240 | REDRT | Health check failed | This article |
| 1012241 | REDRT | State switch to Fault | This article |
| 1300001 | CCOpcUaServer | OPC UA server not responding | Check OPC UA endpoint configuration |
FAQ
What does WinCC alarm 1012240 mean?
Error 1012240 is raised by the WinCC RT Professional redundancy control when the internal application health check inside CCDmRtServer_Sync returns a non-zero status. The component cannot complete a database transaction within the configured timeout, typically because the SQL Server instance is unavailable, the archive path is read-only, or the logging database is in a non-ONLINE state.
How do I clear the Fault state raised by error 1012241?
Stop the WinCC Runtime from the WinCC Explorer, restart the SIMATIC WinCC RT Professional service from the Windows Services console, then start the runtime again. The fault state is held in memory only; it is cleared by a clean service restart. If the message reappears within 60 seconds, follow the diagnostic procedure in this article to identify the underlying SQL or archive path problem.
Is WinCC TIA V11 SP2 still supported?
No. TIA Portal V11 reached end-of-life in 2014 and is no longer covered by Siemens security or compatibility patches. Siemens recommends migrating to a current TIA Portal version (V18 or later as of 2026) and updating the runtime to the matching WinCC RT Professional release. The migration preserves the project structure and archive database but updates the SQL instance name and service architecture.
Why is my WinCC trend view empty even though the alarms show no data logging error?
An empty trend view with no REDRT alarms usually indicates a configuration problem rather than a service failure. Verify that the trend control is bound to an existing archive tag, that the archive name has not been renamed during migration, and that the time range filter in the trend properties covers a period when the value was actually changing. Use the WinCC Performance Viewer to confirm the segment flush counter is incrementing.
Can the logging database be moved to a remote SQL Server?
Yes. In the TIA Portal project, open Runtime settings → Services → Data logging → Database connection and enter the remote server name in the form <hostname>\<instance>, for example SCADASVR\WINCC_PRO_RT. The remote SQL Server must have the same major version, the WinCC login (WinCCUser) must be granted db_owner on the logging database, and the firewall must allow TCP/1433 between the runtime PC and the SQL Server. Always test with a small pilot project before migrating production.