Solutions
...
Interacting with Litmus Produc...
Purging of a tag definition
7 min
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 155,141,239,219,133,114 false true false unhandled content type unhandled content type unhandled content type unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type 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