Context-based access clean-up
When performing context-based access clean-up, rows are deleted when their expiry is reached.
Manual clean-up queries
To disable the out-of-the-box cleanup, set session.dbCleanupInterval to 0. Select the rows to delete with the following queries:
- Query 1
SELECT SESSION_ID as v1 FROM RBA_USER_ATTR_SESSION WHERE REC_TIME < (CURRENT_TIME_MILLIS - (attributeCollection.sessionTimeout* 1000))
Query 2 SELECT TXN_ID as v2 FROM AUTH_TXN_OBL_DATA WHERE REC_TIME < (CURRENT_TIME_MILLIS- (attributeCollection.sessionTimeout* 1000))
Query 3 SELECT DEVICE_ID as v3 FROM RBA_DEVICE WHERE (CURRENT_TIMESTAMP - LAST_USED_TIME) > deviceRegistration.inactiveExpirationTime
The following variables must be populated:
- CURRENT_TIME_MILLIS is an integer representing the current time in milliseconds
- CURRENT_TIMESTAMP is the current time as a TIMESTAMP
- attributeCollection.sessionTimeout must match the advanced configuration property with the same name. Default value is 1800 (seconds)
- deviceRegistration.inactiveExpirationTime must match the advanced configuration property with the same name. Default value is 100 (days)
- The data type of REC_TIME is a TIMESTAMP
- LAST_USED_TIME is a field of the table and does not need to be populated
Delete the rows that are selected with the Query 1 string:
DELETE FROM RBA_USER_ATTR_SESSION WHERE SESSION_ID = v1 DELETE FROM RBA_USER_ATTR_SESSION_DATA WHERE SESSION_ID = v1Delete the rows that are selected with the Query 2 string:
DELETE FROM AUTH_TXN_OBL_DATA WHERE TXN_ID = v2Delete the rows that are selected with Query 3 string:
DELETE FROM RBA_DEVICE WHERE DEVICE_ID = v3
v1 corresponds to the SESSION_ID that is selected in Query 1.
v2 corresponds to the TXN_ID that is selected in Query 2.
v3 corresponds to the DEVICE_ID that is selected in Query 3.
Parent topic: Manual database clean-up