Deleting an Event definition
Litmus Production Record Database is capable of monitoring tag data for production events and then record these events.
This does require to setup and manage these event definitions, which does include the deletion of entire event definitions, or parts of an event definition.
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_Event_ManageEventConfiguration
Do learn more about the event monitoring concept and how to define it, please read the document
Variable name | Datatype | Description | Example |
---|---|---|---|
@Action | INTEGER | A numeric representation of a specific action which can be performed. Possible Values:
Mandatory! Can not be NULL or Empty | 1 |
@Identifier | BIGINT | The ID of an event, trigger or item. Can not be null for the actions 2,3 or 4 | NULL |
To Delete an event definition, trigger or item, call the stored procedure PROREC_Event_ManageEventConfiguration 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:
Read out all events and their ID
Delete an entire event definiton.
Delete a trigger.
Delete an item.
The function returns for Action 1 a table as result. The first three columns provide the ID's which are to be used with the other actions.
- For Action = 2, use the values from column "Event Identifier".
- For Action = 3, use the values from column "Trigger Identifier".
- For Action = 4, use the values from column "Item Identifier".
The function will write for the Action 2, 3 and 4 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