Managing Database Growth and Sizing for the SIMATIC BATCH sbdata Directory
Following an upgrade from PCS 7 V7.0 to V9.0 SP1, the threefold expansion of the SIMATIC BATCH online database directory sbdata (e.g., from 4 GB to 12 GB under identical batch retention settings) is caused by the architectural transition to 64-bit Microsoft SQL Server 2014 SP2, enhanced Unicode metadata storage, and granular electronic audit trail logging (FDA 21 CFR Part 11) introduced in modern BATCH releases. To control and reduce sbdata disk consumption without prematurely deleting completed batches, configure automated batch archiving to Process Historian or external storage, execute scheduled SQL Server transaction log truncation on sbdata_log.ldf, and deselect continuous trend logging on non-critical recipe steps.
Table of Contents
- SIMATIC BATCH Database Architecture: V7.0 vs V9.0 SP1
- Root Causes of sbdata Online Directory Expansion
- SIMATIC BATCH Database Components and Storage Allocation Matrix
- Database Maintenance and Size Optimization Procedures
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
SIMATIC BATCH Database Architecture: V7.0 vs V9.0 SP1
In SIMATIC PCS 7, SIMATIC BATCH coordinates multi-unit batch production processes. The real-time operational database resides in the sbdata directory (typically <Drive>:\Program Files (x86)\Siemens\BATCH\sbdata\), hosting Microsoft SQL Server database files: sbdata.mdf (Primary Data), sbdata_log.ldf (Transaction Log), and shared recipe execution caches.
When upgrading from PCS 7 V7.0 (which utilized 32-bit SQL Server 2005) to PCS 7 V9.0 SP1 (which runs 64-bit SQL Server 2014 SP2), plant engineers frequently observe that the physical disk consumption of sbdata expands by 200% to 300% under identical batch production rates and batch retention intervals (e.g., holding 15 days of closed batches online).
Root Causes of sbdata Online Directory Expansion
Detailed technical analysis reveals four primary factors driving this database expansion in V9.0 SP1:
-
Enhanced Audit Trail and Electronic Signatures (21 CFR Part 11): Modern SIMATIC BATCH incorporates rigorous regulatory compliance logging. Every step state transition, operator input, setpoint verification, and electronic signature generates cryptographic checksums and extended metadata records that did not exist in V7.0.
-
64-Bit SQL Server Storage and Unicode Structures: SQL Server 2014 SP2 utilizes larger fixed page allocations (8 KB data pages with 64 KB extents) and stores technological strings in dual-byte Unicode (
NVARCHAR), doubling string storage requirements compared to legacy ASCII formats. -
High-Frequency Continuous Process Tag Logging: In modern APL recipe integration, continuous trend variables associated with recipe phases are logged at higher precision and frequency into
sbdatabefore archiving. -
Un-truncated SQL Transaction Log (
sbdata_log.ldf): Under standard SQL Full Recovery models, the transaction log file expands continuously with every batch transaction. Without regular log truncations and backups,sbdata_log.ldfoften expands to occupy 50% to 70% of the total directory volume.
SIMATIC BATCH Database Components and Storage Allocation Matrix
The following table details the key database files in sbdata and their typical storage footprint:
sbdata.mdfsbdata_log.ldfsbarchive\sbshared\Database Maintenance and Size Optimization Procedures
To optimize and stabilize the disk footprint of sbdata without prematurely deleting batches:
-
Implement Automated Process Historian Archiving:
- In BATCH Control Center (BCC), open System Settings -> Archiving.
- Enable automated archiving to SIMATIC Process Historian (PH).
- Configure BCC to automatically archive batches immediately upon reaching status 'Closed'.
- Configure the retention rule to detach and delete archived batches fromsbdataafter 3 to 5 days, while Process Historian retains them online for years. -
Truncate and Shrink the SQL Transaction Log:
- Open SQL Server Management Studio (SSMS) connecting to theWINCCorBATCHinstance.
- Right-click thesbdatadatabase -> Properties -> Options.
- Set the Recovery Model to Simple (unless continuous point-in-time database replication is required).
- Right-clicksbdata-> Tasks -> Shrink -> Files.
- Select File type: Log, and click OK to reclaim unused transaction log space. -
Refine Recipe Continuous Tag Logging:
- In the BATCH Recipe Editor, open master recipes.
- Review phase properties: uncheck 'Continuous process tag recording' on non-critical technological phases.
- Restrict continuous trend logging strictly to critical process parameters (temperatures, pressures, weights).
Verification
Verify database optimization:
1. Check Windows Explorer properties of the sbdata directory; confirm total file size has reduced significantly.
2. In BATCH Control Center, open a closed batch that was transferred to Process Historian; verify that all recipe events, parameter curves, and message logs open seamlessly from the archive.
3. Execute a new batch run; confirm that batch initialization and step transitions proceed without SQL timeout errors.
4. Verify in Windows Event Viewer that SQL Server reports successful checkpoint and log truncation operations.
Limitations and Operational Precautions
- Never Manually Delete MDF/LDF Files: Manually deleting or moving
.mdfor.ldffiles corrupts the SQL Server instance, destroying active batch data and requiring a complete BATCH database re-initialization. - Database Shrink Frequency: Do not run automated SQL database shrinking in a high-frequency loop; shrinking fragments database indexes. Execute shrinking as a monthly maintenance procedure.
- Active Batch Protection: Never execute maintenance routines while complex, high-risk production batches are actively running; perform maintenance during changeovers.
Engineer FAQ
Can I move the sbdata directory to another hard drive with more space?
Yes. In the BATCH Launch Coordinator and BATCH Advanced Settings, the path to the BATCH database can be relocated to a high-capacity drive (e.g., dedicated SSD array).
Why did sbdata grow even though PDF report generation was disabled?
PDF reports are stored separately in the file system. The growth in sbdata is inside the SQL tables, driven by 64-bit Unicode data structures and detailed 21 CFR Part 11 audit records.
What happens if sbdata runs out of hard drive space?
SIMATIC BATCH will halt all executing batches, block new batch launches, and trigger critical server alarms to prevent data corruption.
Does Process Historian automatically back up SIMATIC BATCH data?
Yes. If the Process Historian archive option is enabled in BATCH Control Center, closed batches are automatically transferred and stored long-term in the PH SQL database.
Technical References
- SIMATIC Process Control System PCS 7 SIMATIC BATCH (V9.0 SP1) Operating Manual (A5E39221520-AB)
- Microsoft SQL Server 2014 Database Maintenance and Optimization Guide
- Siemens Industry Online Support: Database Maintenance for SIMATIC BATCH (Entry ID: 109756832)
Related Articles
- Printing Batch Reports from Archived XML Files in SIMATIC BATCH
- Safely Initializing Redundant SIMATIC BATCH Standby Servers During Active Production
- Troubleshooting Lost OS Server Client Connection on SIMATIC Process Historian
Related Tags
- SIMATIC BATCH
- sbdata
- SQL Server
- Database Sizing
- Process Historian