Resolving OS Compilation Error (302:309): 'Server Data Unable to be Created' in SIMATIC PCS 7
In SIMATIC PCS 7, OS compilation error '(302:309) Server data unable to be created' occurs during the 'Transfer AS/OS Connection Data' phase when WinCC cannot generate or overwrite the server package file (<ProjectName>.pck). This is typically caused by an open WinCC Runtime session locking database files, a locked or corrupted .pck file in the OS project's Packages folder, mismatched computer names between the OS project properties and the Windows OS hostname, or insufficient Windows user group privileges in SIMATIC HMI and SQLServer2005MSSQLUser$Computer$WINCC. Closing WinCC, deleting obsolete .pck files, and verifying the local computer name resolves the error.
Table of Contents
- Mechanics of Server Data Package Generation in PCS 7 Multiprojects
- Root Causes of Error 302:309 During OS Compilation
- Computer Name Verification and Windows Security Group Rights
- Step-by-Step Resolution and Package Recreation Procedure
- OS Compilation Error Diagnostic Matrix
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Mechanics of Server Data Package Generation in PCS 7 Multiprojects
In a SIMATIC PCS 7 client-server architecture, OS Clients do not access AS automation controllers directly. Instead, OS Clients query OS Servers. To enable this, the Engineering Station compiles connection data and generates a Server Data Package (.pck file) in the OS Server project's Packages folder.
The server data package contains structured metadata, including tag prefixes, alarm message classes, archive tags, and server network endpoints (IP addresses and symbolic computer names). When the OS compilation process runs, the AS-OS Engineering tool invokes internal WinCC APIs (CCServerData.exe or WinCC OLE interfaces) to assemble and write this .pck package. If this creation process is interrupted or blocked, the compilation halts abruptly with the fatal error dialog compile OS (302:309) Error: server data unable to be created.
Root Causes of Error 302:309 During OS Compilation
Field diagnostics across PCS 7 V8.0, V8.1 SP1, and V8.2 identify four primary root causes for error 302:309:
-
File Locking by Active WinCC Processes: If the target OS project is currently active in WinCC Runtime, or if background processes (such as
CCProjectMgr.exe,CCDataServer.exe, or SQL Server service instances) hold open file handles in the OS folder, the compiler cannot overwrite the existing.pckfile. -
Computer Name Mismatch: In SIMATIC Manager, the WinCC project stores the engineering computer's hostname under WinCC Explorer > Computer. If the physical Windows computer name was changed after project creation, or if the project was retrieved from another engineering laptop, the compiler tries to bind to the old hostname and fails.
-
Windows Security and DCOM Rights: The active Windows user must be an explicit member of the local Windows groups
SIMATIC HMI,SIMATIC NET, andAdministrators. Lack of permissions prevents writing to the SQL database tables. -
Corrupted Package File: A previously interrupted compile can leave a zero-byte or corrupted
.pckfile that cannot be parsed or rewritten.
Computer Name Verification and Windows Security Group Rights
To ensure the system environment allows package generation:
-
Check Computer Name: Open WinCC Explorer directly on the ES for the target OS project. Navigate to the Computer editor. Verify that the configured computer name matches the local Windows environment hostname (run
hostnamein PowerShell). If it does not match, double-click the computer object, click Change to local computer name, save, and restart WinCC Explorer. -
Verify User Group Memberships: Open Windows Computer Management > Local Users and Groups > Groups. Ensure the logged-on engineering account is a member of:
-Administrators
-SIMATIC HMI
-SIMATIC NET
-SQLServer2005MSSQLUser$<Host>$WINCC(or corresponding SQL Server instance group in newer PCS 7 versions).
Step-by-Step Resolution and Package Recreation Procedure
Follow this sequence to eliminate error 302:309 and compile server data cleanly:
- Close All Engineering and Runtime Tools: Exit WinCC Runtime on the ES/Server. Close WinCC Explorer and SIMATIC Manager.
- Terminate Hanging WinCC Processes: Open Windows Task Manager (or run
CCCleaner.exefrom the Siemens WinCC bin folder) to ensure allCC*.exeandgsc*.exeprocesses are terminated. - Clear Obsolete Server Packages: In Windows File Explorer, browse to the OS project directory:
<ProjectPath>\<OS_Folder>\Packages\
Delete any existing.pckfiles (e.g.,OS_Server_1.pck). The compiler will generate a fresh package. - Reset WinCC Project State: Open the WinCC project directly in WinCC Explorer. Verify that the project opens cleanly and that SQL Server connects without database context errors.
- Recompile OS from SIMATIC Manager: Launch SIMATIC Manager. Right-click the OS object, select Compile, choose 'Entire OS' (with 'Scope: Entire project'), and ensure 'Generate Server Data' is selected. Click Compile.
OS Compilation Error Diagnostic Matrix
The following table categorizes OS compilation errors related to server data generation and database transfer:
302:309Server data unable to be created.pck file locked or computer name mismatched.pck, verify local hostname in WinCC302:301Internal error in the compilation phase302:312No connection to the AS258:1Database context does not exist302:305Driver generator returned warningsVerification
Confirm successful resolution through the following steps:
- Execute the OS compilation in SIMATIC Manager. Confirm that the compilation finishes with '0 Errors' in the compile log.
- Navigate to
<ProjectPath>\<OS_Folder>\Packages\. Verify that a new.pckfile exists with the current system timestamp and a file size greater than 10 KB. - In WinCC Explorer on the OS Client, expand Server Data. Confirm that the newly compiled package appears with the correct server prefix and updated timestamp.
- Verify that OS Clients can successfully download or load the package and display process tags from the OS Server.
Limitations and Operational Precautions
Consider these operational constraints when generating server data:
-
Never Delete the Packages Directory Itself: Only delete the
.pckfiles inside thePackagesfolder; deleting the folder structure itself can cause directory path exceptions during compile. -
Client Package Assignment: In a multi-client project, after compiling server data on the OS Server, you must update the package assignment on all OS Clients (Server Data > Implicit Update or Load Package) before downloading to clients.
-
Redundant Server Pairs: In redundant OS Server configurations, server data is generated for the master OS and automatically references both redundant server nodes. Ensure both servers have identical symbolic connection names in NetPro.
Engineer FAQ
Where can I find the detailed log file for OS compilation errors?
Detailed logs are stored in <OS_Project_Directory>\Siemens\WinCC\Diagnostics\ and in the SIMATIC Manager compilation log viewer (Options > Logs).
Does changing the Windows computer name require updating the OS project?
Yes. If the PC name changes, you must open WinCC Explorer, update the computer name to the new local hostname under the Computer editor, and restart the station.
How do OS Clients know which redundant OS Server to connect to?
The server data package registers both server names and their IP addresses. WinCC Redundancy on the client automatically arbitrates connection failover between the pair.
Technical References
- SIMATIC Process Control System PCS 7 OS Process Control Manual (Entry ID: 109780813)
- SIMATIC PCS 7 Engineering System Compendium Part A - Configuration Guidelines
- WinCC V7.3 / V7.4 Information System: Server Data Creation and Multi-User Architecture
- Siemens Industry Support: Troubleshooting Compile OS Errors and Package Generation
Related Articles
- Exporting Tags from AS to OS via Compile OS Offline Prior to Physical Commissioning
- Resolving Missing WinCC OS in SIMATIC Manager After Migration
- Configuring Multi-Client OS Stations with Cross-Multiproject Access
Related Tags
- Compile OS
- Error 302:309
- Server Data
- PCK File
- WinCC 7.3
- PCS 7 V8.1