Selecting Between WinCC IndustrialDataBridge and Connectivity Pack for External SQL Export
Exporting historical tag archives from a SIMATIC PCS 7 V8.1 SP1 single station to an external Manufacturing Execution System (MES) SQL database can be achieved via the SIMATIC WinCC/IndustrialDataBridge (IDB) or the WinCC OLE-DB Provider (Connectivity Pack). IndustrialDataBridge offers a turnkey, code-free configuration tool with built-in error handling and scheduling, requiring an IDB software license. Conversely, developing a custom VBScript or .NET application using the WinCC OLE-DB Provider executes direct SQL queries against WinCC Tag Logging archives without requiring a Connectivity Pack license when executed locally on the WinCC station. Choosing between them depends on script development resources versus software licensing budgets.
Table of Contents
- Architectural Comparison: IDB vs WinCC OLE-DB Provider
- Licensing Rules for Local vs Remote Archive Access
- Implementation Workflows for Data Export
- Procurement Schedule for Connectivity and IDB
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Architectural Comparison: IDB vs WinCC OLE-DB Provider
Integrating DCS process history into enterprise Manufacturing Execution Systems (MES) or ERP databases requires extracting compressed time-series data from WinCC Tag Logging SQL tables. Siemens provides two distinct technical pathways to accomplish this interface:
Licensing Rules for Local vs Remote Archive Access
Licensing for archive data extraction follows strict Siemens architectural rules:
- Local Execution (On the WinCC Station): When a script executing locally within WinCC Runtime (e.g., Global Script VBScript) queries the local WinCC Tag Logging archive using the
WinCCOLEDBProvider.1connection string, no Connectivity Pack license is consumed or required. - Remote Network Access: If an external client computer connects over the plant network to query the WinCC OLE-DB Provider remotely across TCP/IP, the SIMATIC WinCC/Connectivity Pack server license is mandatory.
- Destination Database Writes: Neither Siemens solution requires special Siemens licensing to write data into the customer's external Microsoft SQL database; standard Microsoft SQL licensing applies.
Implementation Workflows for Data Export
Option A: Turnkey Export via IndustrialDataBridge (IDB)
- Install SIMATIC WinCC/IndustrialDataBridge on the single station.
- In the IDB configuration editor, define the Source: select
WinCC Historical Dataand browse project archive tags. - Define the Destination: select
Database (MS SQL Server)and enter connection credentials. - Configure trigger rules: set cyclic transfer interval (e.g., every 60 seconds) or event-based trigger on batch end.
- Save and launch the IDB runtime service: data transfers automatically with automatic error recovery.
Option B: Custom VBScript via WinCC OLE-DB Provider
Create a cyclic VBScript in WinCC Global Script Editor to query archive tags and insert into external SQL tables:
Sub ExportArchiveToExternalSQL()
Dim connWinCC, connExtSQL, rs, sqlQuery
Set connWinCC = CreateObject("ADODB.Connection")
Set connExtSQL = CreateObject("ADODB.Connection")
' Open connection to local WinCC Archive (License-Free locally)
connWinCC.Open "Provider=WinCCOLEDBProvider.1;Catalog=CC_Project_Name;Data Source=.\\WinCC"
' Query last 5 minutes of data
sqlQuery = "TAG:R,'TI_101#Value','" & CStr(DateAdd("n",-5,Now)) & "','" & CStr(Now) & "'"
Set rs = connWinCC.Execute(sqlQuery)
' Connect to Customer External SQL Server
connExtSQL.Open "Provider=SQLOLEDB;Data Source=MES_SERVER;Initial Catalog=PlantData;User ID=mes;Password=secret;"
' Iterate and insert records
Do While Not rs.EOF
connExtSQL.Execute "INSERT INTO Historian (Tag, Val, Timestamp) VALUES ('" & _
rs.Fields(0).Value & "', " & rs.Fields(1).Value & ", '" & rs.Fields(2).Value & "')"
rs.MoveNext
Loop
rs.Close: connWinCC.Close: connExtSQL.Close
Set rs = Nothing: Set connWinCC = Nothing: Set connExtSQL = Nothing
End Sub
Procurement Schedule for Connectivity and IDB
The following Equipment Schedule specifies the relevant order numbers for data integration packages:
Turnkey Data Transfer Package:
- SIMATIC WinCC / IndustrialDataBridge V7.4 Base (100 Tags): 6AV6371-1DX07-4AX0
- IndustrialDataBridge Tag Expansion (1,000 Tags): 6AV6371-1DX07-4AB0
- IndustrialDataBridge Tag Expansion (10,000 Tags): 6AV6371-1DX07-4AC0
Remote Query Software Package:
- SIMATIC WinCC / Connectivity Pack V7.4: 6AV6371-1DR07-4AX0
[!IMPORTANT]
Commercial Accuracy Disclaimer: IndustrialDataBridge is licensed based on the active number of synchronized tags. The WinCC/Connectivity Pack is licensed per server station for remote client access. Local script-based archive extraction does not require a Connectivity Pack license. Final license quantities and MLFBs must be validated against the applicable Siemens ST PCS 7 Catalog and authorized distributor quotations.
Verification
To verify external SQL export functionality:
- If using IDB: open the IDB Runtime monitor -> confirm connection state displays green for both WinCC and external SQL Server.
- If using VBScript: trigger the script manually and review
WinCC_Sys.logfor SQL execution confirmations. - Log into Microsoft SQL Server Management Studio (SSMS) on the external customer server.
- Query the destination table:
SELECT TOP 10 * FROM Historian ORDER BY Timestamp DESC. - Verify that new process records arrive cyclically with accurate numerical values and valid timestamps.
Limitations and Operational Precautions
Operational boundaries when querying runtime databases:
- Avoid Saturated Cyclic Queries: Do not execute heavy SQL archive queries every second; high-frequency database extraction consumes disk I/O, impacting WinCC operator screen responsiveness.
- Explicit Object Disposal: When utilizing custom VBScripts, always explicitly close recordsets (
rs.Close) and dereference objects (Set rs = Nothing) to prevent OS handle leaks. - Read-Only Enforcement: The WinCC OLE-DB Provider only permits read operations (
SELECT). Never attempt to write records directly to WinCC Tag Logging archive tables.
Engineer FAQ
Do I need to buy a Connectivity Pack license to read WinCC archives from local VBScript?
No. The WinCC OLE-DB Provider is installed with WinCC Runtime and can be queried by local scripts on the same PC without requiring a Connectivity Pack license.
When is the WinCC Connectivity Pack license strictly required?
It is required when an external software application located on a different computer queries the WinCC OLE-DB Provider across the network.
What is the main advantage of IndustrialDataBridge over custom VBScript?
IDB requires zero programming, handles schema mapping graphically, and includes automatic network buffering and reconnection mechanisms that would require substantial custom coding in VBScript.
Can custom VBScripts write directly into external customer SQL tables?
Yes. By creating standard ADO connection objects pointing to the customer's SQL Server, VBScript can execute standard SQL INSERT statements.
Technical References
- Siemens SIMATIC WinCC IndustrialDataBridge V7.4 System Manual (A5E37536418)
- Siemens Industry Online Support Entry ID 38132261: Exporting Archive Data with WinCC OLE DB Provider
- Siemens SIMATIC WinCC Openness: Connectivity Pack Manual
Related Articles
- Configuring WinCC OPC A&E Server and Custom Event Attribute Mapping
- Resolving WinCC Auto-Diagnosis Alarm OS Handles Count Exceeded HIGH Alert Threshold
- Displaying Historical PID Trend Curves for Archived Tags in WinCC Faceplates
Related Tags
- IndustrialDataBridge
- Connectivity-Pack
- WinCC-OLE-DB
- SQL-Export
- Tag-Logging
- MES-Integration