It's all about the answers!

Ask a question

How Do I Delete Data from the RM Database After 6.0?


Nate Decker (37814761) | asked Dec 07 '16, 10:04 a.m.
By default in CLM, when you delete data from one of the applications, that application "forgets" about the data, but it remains in the database. Over time, this can cause the database to be much larger than it needs to be. Data flagged as deleted in CLM should be able to be removed from the database as well. In particular, my team has a need of removing data from the RM database.

In an IBM tech note, there is an explanation of how to delete data from an RM database. It explains that in versions after 6.0, you can enable the task CleanUpUnusedIndexesVersionsTask in the Advanced Properties of the server to periodically delete data from the database that has been deleted in RM.

I decided to try this out by uploading an 800MB artifact to RM in a test environment. I did this and then confirmed that the RM database increased in size by ~800MB. I then deleted the RM artifact. I ran the aforementioned task and then tried to execute the "Shrink Database" command in our SQL Server 2012 instance. The database size remained unchanged. The 800MB was still present.

Has anyone done this successfully? The tech note explains that some databases may have a delay before the database is resized to account for deleted data. In our instance, we've waited 2 or 3 weeks since this test. I can imaging that different database architectures may handle purging of data in different ways. It's conceivable that SQL Server needs to have some kind of explicit command executed in order to purge deleted data, but a couple of internet searches have not revealed any such command.

I have an open Service Request with IBM asking for help on this, but the rep handling the request is taking the position that she believes the CLM task is working as it should (how can we even tell that?) and if the database isn't shrinking, that's our problem with SQL Server. Can anyone confirm?

Comments
Ian Wark commented Dec 08 '16, 2:10 a.m.

It may be that another step is required to shrink the database. For DB2 the process is described in the RTC technote. This may not apply to RM, so please take this with a grain of salt, but perhaps something like reorg and then alter tablespace (database shrink) is necessary.

Reducing the size of the Rational Team Concert repository database

https://jazz.net/library/article/1459



3 answers



permanent link
Donald Nong (14.5k614) | answered Dec 19 '16, 12:47 a.m.
I have done some testing and compared the result with the technote, and believe that for RDNG 6.0.x, there is no way to release space for individual deleted artifacts. As you have observed, the database size remains unchanged. The only way the I found is the delete _all_ artifacts in a project area, and then use the deleteJFSResources command. These are the sizes that I observed of the RDNG database.
1. After registering in JTS - 106.06 MB.
2. After creating two sample projects - 180.06 MB.
3. After deleting all the artifacts in RDNG GUI - 205.06 MB.
4. After running deleteJFSResources command and shrink the database - 153.89 MB.

Also, I don't think the CleanUpUnusedIndexesVersionsTask will do the same thing as the deleteJFSResources command. It maintains the index, so it could be something similar to what "-reindex all" does.

permanent link
James Paulus (20622135) | answered Mar 03 '17, 3:50 p.m.

So, is there actually a way to do this then or does a work item need to be created?


permanent link
Rosa Naranjo (2.9k11723) | answered Apr 10 '18, 11:37 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

A couple of follow-ups/update on this topic:

  1. The technote referenced in original post does mention this regarding relational databases: Note: Due to the nature of how relational databases work with regard to storage, you may not notice any reduction in the physical size of the database tablespace on disk. Refer to vendor documentation on how to reduce the size of the database on disk after deleting large amounts of data.
  2. I just updated the technote to remove the suggestion to enable com.ibm.team.jfs.indexing.service.internal.CleanUpUnusedIndexesVersionsTask. This is due to issues we discovered via defect CleanUpUnusedIndexesVersionsTask incorrectly cleans up versions still in use
  3. There is also this Deployment wiki topic: https://jazz.net/wiki/bin/view/Deployment/DatabaseGrowth

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.