Purging tag and meta data for a specific tag
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
Execute Stored Procedure PROREC_Misc_TagData_and_MetaData_Purge_by_Tag
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 |
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:
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.
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:
With the result returned