Resolving SIMATIC BATCH Database Not Saving Report Data

David Krause13 min read
Process ControlSiemensTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Problem Overview

Engineers running SIMATIC BATCH as the batch automation layer inside SIMATIC PCS 7 frequently encounter a failure mode in which a controlled batch completes execution on the plant floor but no data is persisted to the SIMATIC BATCH database. The visible symptoms of this failure are predictable:

  • The Batch Control Center (BCC) shows the batch as Completed, Aborted, or Stopped, yet the batch history is empty when reviewed from the same workstation or any client.
  • Requesting a report preview from the Batch Report Control returns an error dialog with no message text, no error code, and no HRESULT or Win32 code in the dialog.
  • Direct queries against the SQL Server instance hosting the SIMATIC BATCH schema confirm that the expected rows (batch master, batch steps, batch logs, batch results, electronic signatures) have not been written.
  • The fault reproduces on both the SIMATIC BATCH Server and any connected SIMATIC BATCH Client.

This condition is recoverable, but it requires a structured diagnostic walk because the blank error dialog from the report engine hides the actual root cause. The two most common underlying drivers observed on V9.0 SP1 deployments are (1) insufficient free storage on the SQL Server volumes that host the SIMATIC BATCH transaction log and primary data files, and (2) a corrupted or partially installed BATCH component stack on the PC station. Both are documented failure modes in the official SIMATIC BATCH Readme V9.0 SP1 (Online) release notes.

Field-proven caveat: A blank error from the Batch Report Control almost never originates in the report template (.frx/.rdl). It is a connectivity or persistence failure that the report UI cannot translate into user-readable text. Always validate the database before touching templates.

SIMATIC BATCH Database Architecture

SIMATIC BATCH does not use a generic relational schema. It is a special-purpose batch database modeled on the ISA-88 (S88) batch standard and engineered for the four primary S88 objects: Process, Procedure, Unit, Equipment Module. The schema is therefore narrower than a general SCADA historian schema but stricter in its constraints (for example, step transition tables, batch genealogy, recipe versioning).

From a storage and connectivity perspective, the relevant components are:

Component Role Default Location
SIMATIC BATCH Server service Owns the batch state machine, holds the recipe library, arbitrates batch allocation PC station designated as BATCH Server in PCS 7 project
SIMATIC BATCH Client Operator-facing BCC, Batch Studio, report viewer Engineering or operator station
SQL Server instance (e.g. BHDB) Holds batch master, step results, logs, signatures Typically co-located with BATCH Server or on dedicated SQL host
Recipe libraries Master recipes, procedure libraries BATCH Server file share (typically C:\Program Files\Siemens\Automation\PCS7\SIMATIC BATCH\bin\rcl)
Report templates Crystal Report / RDL files for batch reports BATCH Server Reports folder
Archive folders Long-term storage of closed batches Configured archive path on BATCH Server

The PI Interface for Siemens SIMATIC BATCH documents this database as a special-purpose structure that is optimized for and constrained by the S88 model. The schema is intentionally narrower than a generic historian, but the consequence is that any break in the write path between the BATCH Server and the SQL instance manifests as silent data loss for new batches. See the AVEVA PI Interface for Siemens SIMATIC BATCH documentation for the canonical external description of the schema.

Root Cause Analysis

Working through real support cases, the failure mode where batch data is not saved and report preview returns a blank error traces to one of seven root cause families. The Siemens-published Readme explicitly highlights storage exhaustion and partial installation as documented risks for V9.0 SP1.

# Root Cause Diagnostic Signal Detection Method
1 SQL Server transaction log volume full; BATCH cannot commit SQL error 9002 in ERRORLOG, BATCH Server Event Viewer shows ODBC/ADO failures DBCC SQLPERF(LOGSPACE) on the SIMATIC BATCH database
2 Free disk space below threshold on database drive Readme warning: "if there is not enough storage space, database problems can occur" Monitor free MB on MDF and LDF volumes
3 Batch not Closed before report preview requested BCC shows status Completed but never Closed Inspect batch state transition log
4 BATCH Server service account lacks db_writer permission on SIMATIC BATCH database Event Viewer security audit failure, SQL profiler shows login succeeded but insert denied Validate role membership for the BATCH service account
5 Partial / corrupted installation of PC station (BATCH components) Component services show "not registered", sb* DLLs missing version stamp Re-run SIMATIC BATCH setup, validate with sbsrvchk
6 DCOM / firewall blocks BATCH Client from BATCH Server Client cannot open batch, or opens but cannot commit; server log silent dcomcnfg on BATCH Server, Test-NetConnection on client
7 Report preview calls an obsolete or relocated template path Preview fails only for one recipe / one batch Compare template path in BHDB to actual file share
Important: The SIMATIC BATCH Readme V9.0 SP1 explicitly calls out disk space as a documented cause: "when working with SIMATIC BATCH, the database and batch data will increase and, if there is not enough storage space, database problems can occur." Treat storage health as a first-line check, not a last resort.

Prerequisites for Diagnosis

Before changing configuration on a live PCS 7 plant, confirm the following prerequisites. They keep the diagnostic path reversible and avoid creating a second outage while solving the first.

  1. A valid PCS 7 backup of the project (BATCH Server, AS stations, OS Server, OS Clients) dated before the first failed batch.
  2. Read access to the SQL Server hosting the SIMATIC BATCH database (typically the BHDB instance). sysadmin role is preferred; db_owner on the SIMATIC BATCH database is the minimum.
  3. Read access to Windows Event Viewer on the BATCH Server and on any BATCH Client that reproduces the failure.
  4. The SIMATIC BATCH installation media matching the deployed version (V9.0 SP1 for V9.0 SP1 systems). Mixing versions is a documented re-installation pitfall.
  5. A maintenance window approved by operations if any service restart is required. Do not restart the BATCH Server service while batches are in Running state; allow them to reach Held first.

Step-by-Step Diagnostic and Recovery Procedure

Step 1 - Verify Batch State and Closure

The single most common cause of "data not saved in the SIMATIC BATCH database" reported during report preview is that the operator requested the preview while the batch was still in Completed state rather than Closed. In SIMATIC BATCH, Completed is reached at the end of the procedure logic; Closed is reached only after the BATCH Server writes the final records to SQL and freezes the batch for archiving.

  1. Open the Batch Control Center on the BATCH Server.
  2. Locate the affected batch in the batch list. Confirm the State column shows Closed, not Completed.
  3. If the state is Completed, right-click the batch and select Close. This forces the BATCH Server to flush step results, batch log entries, and signature records to the SQL database.
  4. After closing, retry the report preview. If the preview still fails, proceed to Step 2.
Why this matters: Without an explicit Close transition, the BATCH Server keeps the batch in a working set and report templates query against rows that the SQL transaction has not yet committed. The result is the symptom of "no data saved" even though the data is held in the BATCH Server's local in-memory state.

Step 2 - Validate SQL Server Storage

The Readme explicitly warns that the SIMATIC BATCH database grows continuously and that storage exhaustion causes database failures. Validate every volume hosting the database:

  1. Open SQL Server Management Studio and connect to the SIMATIC BATCH instance.
  2. Run DBCC SQLPERF(LOGSPACE); and confirm that the SIMATIC BATCH database log file is below 80% used. If it is above, the transaction log is the bottleneck.
  3. Run SELECT name, physical_name, size*8/1024 AS SizeMB FROM sys.master_files WHERE database_id = DB_ID('BHDB'); and record the size of the MDF and LDF files.
  4. On the BATCH Server (or the dedicated SQL host), open Disk Management and verify that the volumes hosting those files have at least 20% free space.
  5. If the transaction log is the constraint, grow the log file: ALTER DATABASE BHDB MODIFY FILE (NAME = BHDB_log, SIZE = 51200MB, FILEGROWTH = 5120MB); Adjust the size to your environment.
  6. Configure the recovery model. For batch archival, SIMATIC BATCH deployments typically use SIMPLE recovery; switch with ALTER DATABASE BHDB SET RECOVERY SIMPLE; only after confirming with the site DBA.

Step 3 - Validate SQL Server Service and Connectivity

  1. Open SQL Server Configuration Manager on the SQL host. Confirm the MSSQLSERVER service (or the named instance) is Running.
  2. Confirm that TCP/IP protocol is enabled on the SQL instance. Named Pipes alone often fails when the BATCH Client is on a different subnet.
  3. From the BATCH Server, run Test-NetConnection -ComputerName <SQLHOST> -Port 1433. Port 1433 must respond.
  4. From the BATCH Client, repeat the same test. If it fails, the report preview error is a firewall or DNS symptom, not a database symptom.
  5. In Event Viewer > Windows Logs > Application, filter by source MSSQLSERVER and SIMATIC BATCH. Capture any 9002, 17130, or ODBC failures from the same hour as the failed batch.

Step 4 - Validate BATCH Service Account Permissions

  1. Open Services on the BATCH Server. Identify the account running SIMATIC BATCH Server.
  2. In SQL Server, run SELECT dp.name FROM sys.database_principals dp INNER JOIN sys.database_role_members drm ON dp.principal_id = drm.role_principal_id INNER JOIN sys.database_principals m ON drm.member_principal_id = m.principal_id WHERE m.name = '<DOMAIN\BATCHSVC>';
  3. The account must be a member of db_owner on the SIMATIC BATCH database. If it is only public, writes will silently fail for batches that require elevated privileges.
  4. Re-add if missing: ALTER ROLE db_owner ADD MEMBER [<DOMAIN\BATCHSVC>];

Step 5 - Validate PC Station Installation Integrity

When storage, permissions, and connectivity are healthy but data still fails to persist and the report preview returns a blank error, the next most likely cause is a partial PC station installation. The SIMATIC BATCH Readme documents this as a known reinstall requirement after a failed or interrupted setup.

  1. On the BATCH Server, navigate to C:\Program Files\Siemens\Automation\PCS7\SIMATIC BATCH\bin.
  2. Confirm that core DLLs (sb_core.dll, sb_server.dll, sb_report.dll) are present and have identical file versions to the BATCH Clients.
  3. Open Component Services (dcomcnfg) and expand Computers > My Computer > DCOM Config. Confirm that the SIMATICBatchServer and SIMATICBatchClientControl entries are registered and accessible to the BATCH service account.
  4. If any component is unregistered or version-mismatched, perform a controlled PC station reinstall. Plan A: reinstall SIMATIC BATCH only, using the V9.0 SP1 media. Plan B (last resort): rebuild the PC station from OS image plus PCS 7 stack, as recommended in escalation notes.
Escalation note: When the BATCH Server has been in service for more than two major PCS 7 versions or has accumulated hotfixes, a complete PC station rebuild is more reliable than incremental repair. Engage Siemens Industry Online Support for a formal service request before executing the rebuild on a production plant.

Step 6 - Validate Report Template Path

  1. In Batch Studio, open the recipe library and select the affected master recipe.
  2. Open the Report Settings dialog and note the template path. The path is typically a UNC share such as \\<BATCHSRV>\SIMATIC_BATCH\Reports\<recipe_name>.frx.
  3. From the BATCH Client that reproduces the error, open the template path in Explorer. If the path is unreachable, the report engine fails before it can query the database, producing a blank error dialog.
  4. Correct the path or restore the share. Retry the preview.

Step 7 - Escalate via Siemens Service Request

If the preceding steps do not produce a clean preview, escalate via the official Siemens Industry Online Support portal. Provide the diagnostic bundle:

  • Full Windows Event Viewer export from BATCH Server and SQL Server covering the failure window.
  • SQL Server ERRORLOG for the same window.
  • Output of DBCC SQLPERF(LOGSPACE) and sp_helpdb BHDB.
  • List of installed SIMATIC BATCH hotfixes (Control Panel > Programs > View installed updates).
  • PCS 7 project version and AS firmware version.
  • Screenshot of the blank error dialog from the Batch Report Control.

Verification Procedure

After applying the corrective action, validate end-to-end using a controlled test batch. Do not declare the fault resolved on the basis of the originally failed batch.

  1. Start a new test batch in a non-product recipe. Run it through to Completed.
  2. Close the batch from the BCC.
  3. Confirm rows in SQL: SELECT TOP 10 * FROM BHDB.dbo.BatchHeader WHERE BatchName LIKE 'TEST_%' ORDER BY StartTime DESC; The new batch must appear.
  4. Confirm step results: SELECT COUNT(*) FROM BHDB.dbo.BatchStepResult WHERE BatchId IN (SELECT BatchId FROM BHDB.dbo.BatchHeader WHERE BatchName LIKE 'TEST_%');
  5. Request a report preview on the test batch. The preview must render with all transitions, parameter values, and signatures.
  6. Repeat the preview from a BATCH Client on a separate workstation. This validates DCOM and report template path resolution.
  7. Verify archive: confirm the test batch appears in the configured archive folder after Close.

Preventive Maintenance Recommendations

Frequency Action Threshold
Daily Monitor free disk on BATCH DB volumes > 20% free, alert at 15%
Daily Monitor SQL transaction log used % < 80%
Weekly Run DBCC CHECKDB on BHDB Zero consistency errors
Monthly Archive closed batches older than retention policy Per site policy
Quarterly Reconcile BATCH Server DLL versions against BATCH Clients Identical file versions
Per major upgrade Rebuild PC station with matched media Align with PCS 7 upgrade project

Field-Proven Caveats

  • A blank error from the Batch Report Control is almost always a lower-layer failure (SQL, storage, DCOM, share path). The report engine does not surface the underlying cause.
  • The "Closed" transition is mandatory before report preview. Completed is necessary but not sufficient.
  • Mixing SIMATIC BATCH versions between Server and Client (for example, Server on V9.0 SP1, Client on V9.0 without SP) produces the same blank-error symptom, even with healthy SQL and storage. Always match.
  • SQL Server Express deployments have a hard 10 GB per-database cap. On long-running plants, this limit is reached inside 18-30 months. Plan a migration to SQL Server Standard before the limit is hit.
  • Antivirus scanning of the BATCH archive folder and recipe library share can lock files mid-write, producing the same blank-error symptom. Exclude the SIMATIC BATCH program data folder from real-time scanning per Siemens guidance.

FAQ

Why does SIMATIC BATCH show the batch as Completed but no rows exist in SQL?

The Completed state is reached when the procedure logic finishes on the AS, but the batch is not yet Closed. Until an operator closes the batch from the Batch Control Center, the BATCH Server holds the step results in memory and the SQL transaction is not committed. Right-click the batch and choose Close to force the persistence.

What is the most common cause of a blank error when previewing a batch report?

In practice, the blank dialog masks a SQL or storage failure rather than a template problem. The SIMATIC BATCH V9.0 SP1 Readme explicitly warns that insufficient disk space on the database volumes causes database problems. Validate free disk space and SQL transaction log usage first.

Can a partial installation of the BATCH PC station cause the database not to save data?

Yes. If the BATCH components on the Server are corrupted, unregistered, or version-mismatched against the Clients, the write path to SQL fails silently. The fix is a controlled reinstall of the SIMATIC BATCH components from matching media, or a full PC station rebuild if the corruption spans the PCS 7 stack.

Does SIMATIC BATCH use a standard relational schema?

No. The SIMATIC BATCH database is a special-purpose schema optimized for the S88 batch model. It is intentionally narrower than a general historian, with strict constraints for procedure transitions, unit allocation, and batch genealogy. External systems such as the PI Interface for Siemens SIMATIC BATCH document this schema explicitly.

Should I escalate a SIMATIC BATCH database not-saving fault to Siemens Support?

Yes, if the storage, permissions, connectivity, and closure checks all pass. Open a service request via Siemens Industry Online Support and attach the Event Viewer export, SQL ERRORLOG, output of DBCC SQLPERF(LOGSPACE), the installed hotfix list, and a screenshot of the blank error. A formal service request is faster than incremental remote guesswork on a production PCS 7 plant.

Back to blog