Caution webMethods doesn’t recommend deleting the data from SQL tables directly but in several instances they provided sql queries to delete when customers ran into problems with
tn.archive.archiveAfterDays
tn.archive.deleteAfterDays
Below are the queries that we need to execute one after the other to remove the data from TN Tables to clear up the data.
We have to shut down webMethods to execute these commands.
DELETE FROM DeliveryJob WHERE DocID IN (SELECT DocID FROM BizDoc WHERE DocTimestamp < ?);
DELETE FROM ActivityLog WHERE RelatedDocID IN (SELECT DocID FROM BizDoc WHERE DocTimestamp < ?);
DELETE FROM ActivityLog WHERE EntryTimestamp < ?;
DELETE FROM BizDocUniqueKeys WHERE DocID IN (SELECT DocID FROM BizDoc WHERE DocTimestamp < ?);
DELETE FROM EDITracking WHERE DocID IN (SELECT DocID FROM BizDoc WHERE DocTimestamp < ?);
DELETE FROM BizDocRelationship WHERE DocID IN (SELECT DocID FROM BizDoc WHERE DocTimestamp < ?);
DELETE FROM BizDocRelationship WHERE RelatedDocID IN (SELECT DocID FROM BizDoc WHERE DocTimestamp < ?);
DELETE FROM BizDocAttribute WHERE DocID IN (SELECT DocID FROM BizDoc WHERE DocTimestamp < ?);
DELETE FROM BizDocArrayAttribute WHERE DocID IN (SELECT DocID FROM BizDoc WHERE DocTimestamp < ?);
DELETE FROM BizDocContent WHERE DocID IN (SELECT DocID FROM BizDoc WHERE DocTimestamp < ?);
DELETE FROM BizDoc WHERE DocTimestamp < ?;
After we successfully execute we can include the following parameters in
webMethods Admin → Solutions → Settings → TN Properties → Edit TN Properties Settings
tn.archive.archiveAfterDays=30
tn.archive.deleteAfterDays=90