How does wincc archive backup? Wincc user archive backup method
Siemens’ WINCC software provides convenient variable archiving and alarm archiving backup functions. But what I didn’t expect was that Wincc user archives did not have an automatic backup function. Recipe data and report record data stored in user archives are indeed key data for production and need to be regularly backed up.
Of course, Siemens also provides standard interface functions to provide export functions. Yes, a table-by-table export function. The project has changed, and the recipe has a re-editing script to re-export. Based on the actual situation of the project, the official method provided by Siemens was abandoned, and other methods were chosen to process the backup data.
Here, three Wincc user archive backup methods used by Changhui Instrument are provided. Welcome to discuss together!
Method 1: Integrity backup as a bak file
Borrow the powerful SQL syntax, execute the SQLCMD command through VBS, and execute the T-SQL backup command that has been tested. Since the cmdshell command needs to be used, SQL is closed by default and needs to be opened in the T-SQL command. Remember to close it after completion, otherwise SQL is in a dangerous state. Combined with Wincc, the time for repeated execution can be flexibly defined. You can flexibly control the backup cycle and how to save backup files. Depending on the actual requirements of the site, some scripts are as follows:
In the actual test, the backup speed is basically at the ms level, and the screenshot is as follows.
Method 2: Export table data Using the BCP command
BCP utility can be used in Microsoft SQL Server instances and user-specified format dataBulk copy data between data files. Use the BCP utility to import large numbers of new rows into SQL Server tables, or to import table data into data files. No knowledge of Transact-SQL is required to use this utility unless used with the queryout option. BCP can be run either at the CMD prompt or under SSMS.
As shown in the figure: export the data of the corresponding table, if the table name has a fixed label, you can flexibly control the data export of the table, even if you create a new external form or add new data, you don’t need to adjust the script. By executing SQLCMD through VBS, the name of the table can be flexibly controlled.
Method 3: Use the C command WinCC ODK uaArchiveExport and uaArchiveImport functions provided by WINCC
If you are interested in detailed instructions, you can check Siemens’ official help manual. Of course, the official one is the safest and most reliable, but it is much less flexible, and the script may be adjusted according to needs until the last moment. The basic requirements for C scripts are also very high, and the specific scripts can be handled according to the official guidance documents.