Solutions
...
Interacting with Litmus Produc...
Purging tag and meta data for a specific tag
6 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 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 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 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