Solutions
...
Litmus Production Record Datab...
Interacting with Litmus Produc...
Purging of a tag definition
7min
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 to purge a tag definition, first all of the related tag and meta data have to be purged otherwise data without a context would exist in the database for how to purge all tag and meta data for a data model, please follow the instructions here purging tag and meta data for a specific tag docid\ j0av4rhsdgvtccnpvyrz3 user can purge individual tag definitions, 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 tag hierarchy purge 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) 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 a specific tag definition, call the stored procedure prorec misc tag hierarchy purge 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 tag hierarchy purge] @tag = n' serialno ', @device = n'plc rc1 ccs'; note the system will always create a backup first before purging this way, the data model 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 all tag data are purged and then create the backup before purging the tag definition 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 tag hierarchy purge ' order by logid desc; with the result returned