Problem Overview
When downloading a WinCC Unified V20 project from TIA Portal to a WinCC Unified PC Runtime, the download sequence can fail when the project is configured to use Microsoft SQL Logging. The error is raised by the Unified download manager when it cannot confirm a SQL Server database runtime on the target device. The error message typically points to a missing or unrecognized database instance on the runtime PC, not to a network or licensing fault.
This symptom is frequently reported on installations where the engineering PC runs TIA Portal V20 together with a full Microsoft SQL Server (often SQL Server 2019 or 2022 Standard or Express) for other engineering databases. The engineer assumes that because SQL Server is installed and the same SQL instance exists on both the engineering and the runtime PCs, the Unified project should download successfully. It does not, because WinCC Unified PC Runtime does not rely on a generic SQL Server install; it requires a specific, registered Unified database component.
Understanding the split between the base WinCC Unified PC Runtime installer and the optional Unified database package is the key to resolving the fault.
How WinCC Unified Stores Runtime Data
WinCC Unified PC Runtime supports two logging backends that can be selected during project configuration in TIA Portal:
- SQLite - the default file-based store. No external database engine is required on the target PC. The base WinCC Unified PC Runtime installer is sufficient.
- Microsoft SQL Server - an external relational database engine used for high-volume or centralized logging. Requires an additional Unified database option on the target PC and a properly configured SQL Server instance.
The runtime setting that controls this is located in the TIA Portal project tree under:
HMI device → Runtime settings → Storage → Logging → Database system
When the project is set to Microsoft SQL, the download procedure validates the target system against the Unified database service. If the service cannot find a registered Unified SQL instance, the download is aborted with a corresponding error.
SQLite vs Microsoft SQL comparison
| Criterion | SQLite | Microsoft SQL |
|---|---|---|
| External DB engine required | No | Yes (SQL Server 2019 or 2022) |
| Optional Unified DB package required | No | Yes (separate media) |
| Recommended for single-station projects | Yes | Optional |
| Recommended for multi-station / central logging | No | Yes |
| Concurrent writers | Limited | Yes (full transactional engine) |
| Backup / restore tooling | File copy | SQL Server native tools, third-party |
| High availability (clustering, AG) | No | Yes |
Root Cause
The root cause in the vast majority of "cannot download WinCC Unified project with Microsoft SQL Logging" cases is a missing WinCC Unified database option on the runtime PC. The base WinCC Unified PC Runtime installation media only contains the runtime core, the HMI shell, and the configuration services. It does not contain the SQL Server integration components.
The Unified database option is shipped as a separate ISO/DVD, typically labeled as "Optional Packages" or "WinCC Unified Database" within the WinCC Unified PC Runtime media set. The base media installation alone is not sufficient.
When this optional component is missing:
- The Unified Configuration service cannot discover a registered SQL Server instance for the project.
- The download manager rejects the project because the configured logging target (Microsoft SQL) is unsupported on the target system.
- SQL Server may still appear to be installed and running on the PC, but it is not registered with the Unified database service, so the download still fails.
WINCCUNIFIED) with the Unified configuration service. Without this registration, the project cannot be downloaded.Affected Versions and Platforms
This issue is known to affect the following versions and platforms:
- TIA Portal: V17, V18, V19, V20 (project side)
- WinCC Unified PC Runtime: V17, V18, V19, V20 (target side)
- Operating systems: Windows 10 IoT Enterprise LTSC 2021, Windows 11 Pro/Enterprise/IoT, Windows Server 2019/2022 (all 64-bit)
- SQL Server: Microsoft SQL Server 2017, 2019, 2022 (Standard and Express)
Note that a V20 project cannot be downloaded to a V19 or earlier runtime, and vice versa. The TIA Portal major version must match the runtime major version.
Prerequisites
Before performing the corrective steps, verify that the following conditions are met on both the engineering PC and the runtime PC.
Engineering station requirements
- TIA Portal V20 with the WinCC Unified option installed and licensed.
- Local administrator or equivalent rights to download projects.
- The Unified project must compile without errors.
- Network connectivity to the runtime PC on TCP 4800+ (download channel) and TCP 1433 (SQL Server, if a remote instance is used).
- DNS / hostname resolution between both PCs (the pgpcinterface download service uses the host name).
Runtime station requirements
- Supported 64-bit Windows operating system.
- WinCC Unified PC Runtime V20 installed and licensed (RT license activated).
- Local administrator account for installation of the database option.
- If running on Windows 11: Smart App Control must be disabled (see dedicated section below).
- Disk space: at least 20 GB free on the system drive for the runtime, plus sufficient space on the database drive.
Step-by-Step Resolution
Step 1 - Verify the current state of the runtime PC
On the runtime PC, open Start → Siemens Automation → WinCC Unified Configuration and review the Database section. If the section reports No database installed or shows an empty instance list, the Unified database option is missing.
You can also verify from an administrative command prompt:
sc query "Siemens.UnifiedDatabase"
If the service does not exist, the database option has not been installed.
Step 2 - Locate the Unified database installer
The Unified database option is shipped on a separate ISO or DVD within the WinCC Unified PC Runtime media set. Look for a medium labeled WinCC Unified PC Runtime - Optional Packages or WinCC Unified Database. If you downloaded the software from the Siemens online support portal, the optional package is provided as a separate download with a name such as SIMATIC_WinCC_Unified_PC_Runtime_V20_Optional_Packages.iso.
The base TIA Portal Unified Runtime media does not contain the database option. If you only have the base media, you must obtain the optional package separately.
Step 3 - Install the database option
- Mount or insert the optional packages media on the runtime PC.
- Launch Setup.exe from the root of the mounted image.
- Select the installation type Install WinCC Unified database.
- Choose the SQL Server option:
- Use existing SQL Server installation - if Microsoft SQL Server 2019/2022 is already installed on the PC.
- Install Microsoft SQL Server with the package - if no SQL Server is present and you want a bundled install.
- Accept the license terms and proceed.
- Restart the runtime PC when prompted.
Step 4 - Verify the SQL Server instance is registered
After the installation, verify that the database instance is correctly registered:
- Open SQL Server Configuration Manager (Start → Microsoft SQL Server → SQL Server Configuration Manager).
- Under SQL Server Services, confirm that SQL Server (WINCCUNIFIED) is in state Running.
- Under SQL Server Network Configuration → Protocols for WINCCUNIFIED, ensure that TCP/IP is enabled.
- Double-click TCP/IP, select the IP Addresses tab, and confirm that IPAll → TCP Port is set to
1433(or your chosen port). - From an administrative command prompt, run:
sqlcmd -S localhost\WINCCUNIFIED -EA successful connection returns a
1>prompt, confirming the instance is reachable.
Step 5 - Adjust the TIA Portal project runtime settings
On the engineering PC, open the project in TIA Portal V20 and adjust the runtime configuration of the Unified PC station:
- In the project tree, select the HMI device (the Unified PC station).
- Open the inspector window and switch to the Properties tab.
- Navigate to Runtime settings → Storage → Logging.
- Set the Database system parameter to Microsoft SQL.
- Configure the connection string:
-
Data source: the SQL Server host name, e.g.
RuntimePC01\WINCCUNIFIEDfor a local instance orSQLSERVER01\WINCCUNIFIEDfor a remote instance. - Catalog: leave the default catalog or specify a project-specific database name.
- Authentication: Windows Authentication (recommended) or SQL Server Authentication.
-
Data source: the SQL Server host name, e.g.
- Compile the project (right-click the HMI device → Compile → Software (rebuild all)).
Step 6 - Re-download the project
- In the project tree, right-click the Unified PC station.
- Select Download to device → Software (all).
- If prompted, select the target interface and click Search to find the runtime PC.
- Select the device and confirm with Load.
- The download should complete without the SQL-specific error.
Windows 11 Smart App Control Check
On Windows 11, the operating system feature Smart App Control can block unsigned components of the Unified runtime stack, which can manifest as a failed download, a runtime that does not start, or a runtime that crashes shortly after launch. The Siemens TIA Portal V20 readme specifically calls this out in the "Notes on use - WinCC Unified PC" section.
To disable Smart App Control:
- Open Settings → Privacy & Security → Windows Security.
- Click App & browser control.
- Select Smart App Control settings.
- Set the option to Off.
- Reboot the PC.
Reference: Notes on use - WinCC Unified PC (TIA Portal V20 readme).
ODBC Configuration for Remote SQL Server
If the project is configured to log to a remote SQL Server, additional ODBC configuration is required on both the engineering and the runtime PC.
Create a 64-bit ODBC System DSN
- On the runtime PC, open ODBC Data Sources (64-bit) from the Control Panel or %windir%\System32\odbcad32.exe.
- Switch to the System DSN tab and click Add.
- Select ODBC Driver 17 for SQL Server (or 18, depending on what is installed).
- Configure the data source:
-
Name:
WINCCUNIFIED - Description: WinCC Unified database
-
Server:
SQLSERVER01\WINCCUNIFIED
-
Name:
- Click Next and configure the authentication. Use Windows Authentication when possible.
- Test the data source with the Test Data Source button.
Enable SQL Server Browser and open the firewall
If the project uses a named instance (other than the default instance), the SQL Server Browser service must be running on the SQL Server host:
- Open SQL Server Configuration Manager on the SQL Server host.
- Start SQL Server Browser if it is stopped.
- Set its startup mode to Automatic.
On the firewall, open the following ports:
- TCP
1433for the default SQL Server instance. - UDP
1434for the SQL Server Browser service (named instances). - Any additional dynamic port if configured explicitly.
Service Account and Permission Considerations
When Windows Authentication is used for the SQL connection, the runtime service account must have db_owner rights on the configured catalog. The default service account for the Unified runtime is LocalSystem, which is not a domain account and therefore cannot access a remote SQL Server with Windows Authentication unless constrained delegation or group-managed service accounts (gMSA) are used.
For deployments that log to a remote SQL Server, consider one of the following:
- Use a group-managed service account (gMSA) for the Unified runtime, with the gMSA granted db_owner on the catalog.
- Use SQL Server Authentication with a dedicated login whose password is rotated on a regular schedule.
- Co-locate the SQL Server with the Unified runtime on the same PC to avoid cross-machine authentication complexity.
Diagnostic Logs and Tools
If the download still fails after the steps above, gather diagnostic data:
-
WinCC Unified Configuration trace:
C:\ProgramData\Siemens\Automation\WinCCUnified\Log\ - TIA Portal download trace: Enable via Options → Settings → General → Trace and reproduce the download.
-
SQL Server error log:
C:\Program Files\Microsoft SQL Server\MSSQL16.WINCCUNIFIED\MSSQL\Log\ERRORLOG - Windows event log: Application and System logs, filtering for sources SQLSERVER and Siemens.
Common error codes that may appear in the Unified log or the SQL Server log:
| Code / pattern | Meaning | Remediation |
|---|---|---|
| Cannot find SQL instance 'WINCCUNIFIED' | Database option not installed | Install optional Unified database package |
| Login failed for user 'NT AUTHORITY\SYSTEM' | Runtime service cannot authenticate to SQL | Grant the runtime account login rights on SQL Server |
| A network-related or instance-specific error occurred (provider: TCP) | SQL port blocked or Browser not running | Open TCP 1433/UDP 1434, start SQL Server Browser |
| The database 'WINCCUNIFIED' does not exist | Catalog not created | Re-run the Unified database installer with Initialize catalog |
| Version mismatch between project and runtime | TIA Portal / runtime major versions differ | Match the TIA Portal and runtime versions |
Performance and Sizing Notes
For high-volume logging (more than 10,000 tag changes per second aggregate, or archive sizes above 50 GB), consider the following:
- Place the SQL Server data files (
.mdf) and log files (.ldf) on separate physical disks, ideally SSDs with low write latency. - Set the SQL Server max server memory to leave at least 4 GB free for the operating system and the Unified runtime.
- Schedule a SQL Server index rebuild job weekly to keep query performance stable as the catalog grows.
- Enable SQL Server backup compression and configure a maintenance plan with full backups nightly and transaction-log backups every 15 minutes.
Migration from Older Versions
When migrating a Unified project from V17/V18/V19 to V20 while keeping Microsoft SQL Logging:
- Back up the existing SQL catalog on the old runtime.
- Install the V20 Unified runtime and the matching V20 optional database package on the target PC.
- Run the V20 catalog upgrade script provided with the database package.
- Update the TIA Portal project to V20, recompile, and re-download to the V20 runtime.
- Verify tag logging and alarm logging on a test page before going live.
Troubleshooting Matrix
| Symptom | Likely Cause | Action |
|---|---|---|
| Download fails immediately with "no SQL instance found" | Unified database option not installed | Install optional database package from separate media |
| Download succeeds but runtime cannot write logs | Wrong instance name in TIA Portal project | Correct instance name in runtime settings → Storage |
| Connection error to remote SQL Server | Firewall blocks TCP 1433 or UDP 1434 | Open firewall, enable SQL Server Browser |
| Unified runtime does not start on Windows 11 | Smart App Control is enabled | Disable Smart App Control and reboot |
| Version mismatch error during download | TIA Portal V20 project vs. older runtime | Match the TIA Portal and runtime major versions |
| Login failed for user during download | SQL service account lacks rights | Grant the runtime service account db_owner on the catalog |
| ODBC test fails on engineering PC | Missing 64-bit ODBC driver | Install ODBC Driver 17/18 for SQL Server |
| Project loads but tag logging is empty | Tag logging was set to SQLite only | Verify Tag logging → Database backend is set to Microsoft SQL |
FAQ
Why does TIA Portal reject my Unified project even though SQL Server 2022 is installed?
WinCC Unified requires its own database option package to register the SQL instance with the Unified configuration service. A standalone Microsoft SQL Server installation does not satisfy this requirement; install the WinCC Unified optional database package from the separate Optional Packages ISO.
Which SQL Server versions are supported by WinCC Unified V20?
WinCC Unified V20 supports Microsoft SQL Server 2019 and 2022 in Standard or Express editions. Both the engineering and runtime stations should use the same major version to avoid compatibility issues.
Do I need to disable Smart App Control on Windows 11?
Yes. On Windows 11, Smart App Control can block unsigned Unified runtime components. Set it to Off under Settings → Privacy & Security → Windows Security → App & browser control, then reboot the PC.
Can the engineering PC and Runtime PC share the same SQL Server instance?
Yes, if both PCs are configured against the same SQL Server host and instance. The Unified download will succeed provided the instance is reachable and the Unified database option is installed on the runtime PC.
Where is the WinCC Unified database installer located?
The database installer is shipped on a separate ISO/DVD bundled with the WinCC Unified PC Runtime media, labeled as an "Optional Packages" or "Database" disc. It is not part of the main Unified Runtime setup and must be obtained separately if not included in the media set.