There are many reasons why you may want to clear old exceptions. You could be looking to remove sensitive information or prevent the exception manager from storing too much data. There are two stored procedures in the TimeXtender Orchestration and Data Quality database to modify old exceptions.
These are:
- usp_maint_cleanup_rllissues_by_task
- usp_maint_cleanup_rllissues_columns_by_task
In this article, you will read more about each of these stored procedures and how you can use them to clear old exceptions in TimeXtender Orchestration and Data Quality.
usp_maint_cleanup_rllissues_by_task
This procedure deletes exceptions. It takes in 6 parameters which determine which exceptions will be deleted
- TaskId - The id of the query or compare query
- TaskType – Specify the type of query or compare query. Queries use the type EBI_EVENT while compare queries use the type EBI_VALIDATION
- UAT – Only exceptions created on this UAT should be deleted
- DeleteOlderInDays – Number of days. Exceptions older than the number will be deleted
- DeleteOpenExceptions – A bit value, whether open exceptions should be deleted
- DeleteNotAnException – A bit value, whether exceptions marked as “Not an exception” should be deleted
This procedure finds all exceptions that fulfil given conditions and deletes them.
Example of legal parameters
- TaskId: 30
- TaskType: EBI_VALIDATION
- UAT: PROD
- DeleteOlderInDays: 60
- DeleteOpenExceptions: 0
- DeleteNotAnException: 0
A compare query with the id 30 will have all closed exceptions older than 60 days, that were created under the UAT PROD deleted. Exceptions marked “Not and exception” will not be deleted.
usp_maint_cleanup_rllissues_columns_by_task
This procedure clears data from exceptions. It takes 5 parameters which determine which exceptions will have their data cleared
- TaskId - The id of the query or compare query
- TaskType – Specify the type of query or compare query. Queries use the type EBI_EVENT while compare queries use the type EBI_VALIDATION
- UAT – Exceptions created on this UAT should be cleared of their data
- DeleteOlderInDays – Number of days. Exceptions older than the number will be cleared of their data
- ClearDataFromColumns – A comma-separated list of columns whose data should be cleared
This procedure finds all exceptions that fulfil given conditions and clears all the columns specified.
Example of legal parameters
- TaskId – 1
- TaskType – EBI_EVENT
- UAT – DEV
- DeleteOlderInDays – 90
- ClearDataFromColumns – user_id, name, email_address
A query with the ID 1 will have all exceptions older than 90 days, that were created under the UAT DEV cleared of their data in the columns [user_id], [name] and [email_address].