Solutions
...
Litmus Production Record Datab...
Interacting with Litmus Produc...
Purging tag and meta data for a specific tag
6min
use cases it might be necessary for users to remove an individual tag definition from the database, if they for example discontinue to use it or other circumstance make it obsolete this also requires to purge all associated tag and meta data otherwise data without a context would exist in the database user can purge all tag and meta data for a specific tag, which will include all the id's user can do this either by using applications such as microsoft sql server management studio mssql cli this can also be used for building custom solutions based on applications which allow for an odbc connection such as excel c# net python method execute stored procedure prorec misc tagdata and metadata purge by tag input variables variable name datatype description example @tag varchar(50) the name of the tag mandatory! can not be null or empty serialno @device varchar(50) varchar(50) the name of a specific device devices in litmus production record database are acting the same way as they do in litmus edge in grouping tags logically together it is recommended to use the same device name as used in litmus edge mandatory! can not be null or empty plc rc1 ccs how to use to purge all tag and meta data for a specific tag definition, call the stored procedure prorec misc tagdata and metadata purge by tag using the t sql exec or execute keyword and provide the input variables below is an example using t sql in sql server management studio execute \[le productionrecord] \[dbo] \[prorec misc tagdata and metadata purge by tag] @tag = n' serialno ', @device = n'plc rc1 ccs'; note the system will always create a backup first before purging this way, the production record data can always be restored if an output window does exist, the progress can be observed result the stored procedure will verify that the provided values are correct and data exist then it will create the backup before purging the tag and meta data the result can be read back from the log table prorec misc log below is an example using t sql in sql server management studio select top (100) \[logid] ,\[logtype] ,\[logprocedure] ,\[logentry] ,\[logtime] from \[le productionrecord] \[dbo] \[prorec misc log] where \[logprocedure] = ' prorec misc tagdata and metadata purge by tag ' order by logid desc; with the result returned