How do you clean up the SESSION_HISTORY table?


The SESSION_HISTORY table uses 500GB of disk space in our production environment. What is the best way to clean it up?

You would want to make appropriate backups and test this thoroughly, but this is something that can be done via the Platform Maintenance Scheduler (formerly Cleanup Agent) in the IBM TRIRIGA Admin Console. You can develop SQL to do the cleanups as they meet your business requirements, add that as a new cleanup command at the bottom section of the window, and then add a new Cleanup Schedule event in the top section of the window to have it run periodically.

This may be something that you want to reach out to a business partner for assistance with, depending on your skill and comfort level in implementing such a change. If so, you can search the IBM PartnerWorld portal.

[Admin: To see other related posts, use the Sessions tag or History tag.]

Continue reading

What happened to the performance monitors in the Admin Console?


In the IBM TRIRIGA Administrator Console, under Performance Monitor > Monitor a Single Value, several monitors are no longer listed.

The following changes were made in the Administrator Console, under Performance Monitor > Monitor a Single Value:

  • CRYSTAL_QUEUE_AGENT_RUNNING is renamed to REPORT_QUEUE_AGENT.
  • CLEANUP_AGENT_RUNNING is renamed to PLATFORM_MAINTENANCE_SCHEDULER.
  • KEYWORD_PARSER_AGENT_RUNNING and WAREHOUSE_AGENT_RUNNING were deprecated in a previous release and are now removed from the Performance Monitor.

Since the CRYSTAL_QUEUE_AGENT_RUNNING and CLEANUP_AGENT_RUNNING monitors are used for integration, only the performance monitor names are changed, not the values or URLs.

[Admin: This post is related to the 07.14.15 post about renaming CleanupAgent (Cleanup Agent) to PlatformMaintenanceScheduler (Platform Maintenance Scheduler). To see other related posts, use the Monitoring tag.]

Continue reading

How do you prevent SQL database log from crashing the database?


I made a big import of data in TRIRIGA, but the resources were not enough to proceed. So I have to stop TRIRIGA and truncate all events to stop the import. But now, the database log never stops growing and crashing the database. Is there a way to clean up and make TRIRIGA stable?

If this is Microsoft SQL Server, this may be related to the following SQL Server defect: SQL Server crashes when the log file of tempdb database is full in SQL Server 2012 or SQL Server 2014.

[Admin: To see other related posts, use the SQL tag or “sql server” search phrase.]

Continue reading

Is there a way to retire all attached child records in bulk?


We are working to clean up a rather large list of child records (floors and spaces) that are attached to retired parent records (buildings). Is there an easy way to mass retire child records? Also, is there a workflow that can be run when a building is retired to avoid this issue in the future?

[Admin: To see other related posts, use the Retire tag.]

Continue reading

Can you get the Cleanup Agent to remove record data in chunks?


In one of our environments, we have a large amount of records that have been transitioned to the null state. When the Cleanup Agent runs, it runs out of DB2 transaction log space executing the following:

DELETE FROM IBS_SPEC_ASSIGNMENTS WHERE EXISTS (SELECT ‘X’ FROM IBS_SPEC_CA_DELETE WHERE IBS_SPEC_CA_DELETE.SPEC_ID=IBS_SPEC_ASSIGNMENTS.SPEC_ID)

For workflow instance saves, the Cleanup Agent now seems to remove the data in small chunks (of 1000 rows each). But for the record data cleanup, it still seems to (try to) remove all data in one huge SQL statement/transaction. Is it possible to get the Cleanup Agent to remove record data in chunks, like it does for workflow instance saves?

Otherwise, I’m thinking of writing a small util that would run the statement above, but in smaller chunks, since it seems we still have the list of record IDs that it tries to remove in the IBS_SPEC_CA_DELETE table. Any obvious issues with that?

As of 3.5.3, there have been no changes for the data to be deleted in chunks for IBS_SPEC_ASSIGNMENTS. This sounds like a good PMR. It is rarely recommended to delete records directly from the database, but in this circumstance, you might be okay. However, the IBS_SPEC_CA_DELETE only exists during the time the Cleanup Agent is running. It is dropped when the agent goes back to sleep.

[Admin: To see other related posts, use the Cleanup tag or SQL tag. As a side note, starting with version 3.4, the Cleanup Agent name was changed to Platform Maintenance Scheduler.]

Continue reading

How do you delete records that exist in T_ table not IBS_SPEC table?


We have some corrupted records, which appeared across 2 different BOs so far. We can’t delete them from the application level, and the cleanup script won’t delete them either, because they can’t be found under the IBS_SPEC table. Does anyone have a SQL to properly cleanup those records from the T_ table?

[Admin: This post is related to the 02.10.15 post about purging records from a BO. To see other related posts, use the Cleanup tag or SQL tag.]

Continue reading

How do you avoid the tree error after deleting hierarchy records?


I’m loading data via the Data Integrator into a Classifications business object. In the first load, my data is successfully loaded. However, I notice some data mapping issues. So I delete the records from a query, then I clear cache. In the second load, my data is successfully loaded. I go into the Classifications hierarchy form and get the dreaded message:

“Please contact your system administrator. The tree control reported this error while trying to draw itself: There was an error in the database or the query definition.”

When this happens, I tell myself that I deleted the records too quickly and didn’t allow the system to reset in time. The solution is the dreaded wait time for the Cleanup Agent to process records that takes 12 hours, 1 day, 3 days, or sometimes 1 week, before all records with a TRIRECORDSTATESY is null, are removed from the database. The only workaround seems to be to increase the Cleanup Agent time. However, is there a sequence of steps I need to follow before I delete records from a hierarchy form, so that I don’t get the dreaded message each time?

Regarding your scenario of loading hierarchy records, deleting them, then reloading the same records to cause the tree control to fail, that should be considered a platform defect. I would advise you to enter a PMR, so Support can look into this issue. The tree control should never fail to render as you describe it.

To help with your issue, there is an unsupported platform feature that allows the Cleanup Agent to delete data immediately. If you add the following property to your TRIRIGAWEB.properties file and set CLEANUP_AGENT_RECORD_DATA_AGE=2, the Cleanup Agent when run will delete records that are 2 minutes old. This allows you to immediately delete a bad data load, and allows you to run it cleanly again a second time without conflicts from that data already existing in a null state.

[Admin: This post is related to the 08.11.16 post about the Organization hierarchy tree not being displayed, the 08.04.16 post about unretiring and returning records to null, and the 02.24.16 post about executing the Cleanup Agent (a.k.a. Platform Maintenance Scheduler) after retiring a record.]

Continue reading

IV94801: TRUNCATE WF_INSTANCE errors in the server log


We’re seeing the following error in the server log:

Error executingsql: Sql[SQL=TRUNCATE WF_INSTANCE,DB transaction ID=(None)] Caused by: StatementCallback; bad SQL grammar [TRUNCATE WF_INSTANCE]; nested exception is java.sql.SQLException: Incorrect syntax near 'WF_INSTANCE'. [MID-2877677308]
com.tririga.platform.persistence.PersistenceException:
Error executing sql: Sql[SQL=TRUNCATE WF_INSTANCE,DB transaction ID=(None)] Caused by: StatementCallback; bad SQL grammar [TRUNCATE WF_INSTANCE]; nested exception is java.sql.SQLException: Incorrect syntax near 'WF_INSTANCE'.

When WF_INSTANCE (workflow instances) are a high number, the TRUNCATE option runs into problems in some situations. Moving forward, we resolved an issue where massive amounts of workflow instances were running into an error when cleaning them up via the Platform Maintenance Scheduler (formerly Cleanup Agent).

Continue reading

Why is classification hierarchy corrupted after daily cleanup?


When you attempt to open the classification hierarchy, an error message is displayed in the hierarchy pane, and you cannot do anything at that point.

We modified the “Clause Type” classification hierarchy using the Cut/Paste and Delete actions in the hierarchy pane of the classification hierarchy view/window. These actions were successful and we saw no immediate issue. However, after the cleanup ran over the weekend, we started getting the error message that the hierarchy encountered an error trying to build itself.

The resolution to the issue was to add the “Classification” value to the TRIRIGAWEB.properties option for REBUILD_HIERARCHIES_ON_CACHE_REFRESH.

Continue reading

What is the TASK_RESULT_LIST table and CLEAN_TIMEOUT property?


In one of our production instances, we have a table called TASK_RESULT_LIST containing almost one billion rows. What is the intent of that table and is there someway we can clean it up?

Anyway, when the Cleanup Agent runs, it is stopped with an Agent Interrupt Exception after 120 minutes (as per CLEAN_TIMEOUT in TRIRIGAWEB.properties). Though, it seems the Cleanup Agent doesn’t start the next day when that happens (or any following day until the process server is restarted). Is there some flag saying that the agent is already running and that flag is not getting reset when the agent is stopped due to hitting the CLEAN_TIMEOUT?

That TASK_RESULT_LIST is used to record workflow step instances. It is not safe to directly modify the table. The Cleanup Agent (a.k.a. Platform Maintenance Agent) is supposed to keep this table clean. Check the following TRIRIGAWEB.properties…

To help work around this, I would set the CLEAN_TIMEOUT property to 300. This will allow the Platform Maintenance Agent to run for a longer amount of time and clean up more records. The reason the table got so large, is that you had workflow instance recording on. Our recommendation is that workflow instance recording is never run in production, or for long periods of time. It is also not safe to truncate that table, as user action and approval tasks would be deleted and would no longer process. We also increased the default value of CLEAN_TIMEOUT to 300 in our next release…

Continue reading