How to add rules for CMDB TWA tables to Archive and Purge in CMDB r12.1.

Document ID : KB000050263
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

This document describes how to add rules for CMDB TWA tables to Archive and Purge in CMDB r12.1

This requires modifying XML files followed by a recycle of Service Desk services.

Solution:

Tables to purge:

  • ci_twa_ci (CI Transactions)
  • ci_twa_relation (Relationship Transactions)

Important! Do not use SQL to delete all records in the TWA because it deletes required header records.
(Administration Guide, Page 539, Chapter 14 Managing Configuration Items, Manage Staged Transactions, TWA Administration, Archive and Purge of the TWA)

  1. Edit NX_ROOT\site\cfg\itil_arcpur_cfg.xml

  2. At the end of the xml file and immediately above </arcpur> add the following:

     <!--   Start of CMDB Rules  -->   <main_obj>      <name>CMDB CI Successful Transactions</name>      <internal_name>ci_twa_ci_1</internal_name>      <factory>ci_twa_ci</factory>      <default_query>tran_status=2 and id != 2000000000</default_query>      <date_field>last_mod_dt</date_field>   </main_obj>    <main_obj>      <name>CMDB CI Inactive Transactions</name>      <internal_name>ci_twa_ci_2</internal_name>      <factory>ci_twa_ci</factory>      <default_query>delete_flag=1 and id != 2000000000</default_query>      <date_field>last_mod_dt</date_field>   </main_obj>    <main_obj>      <name>CMDB Relation Successful Transactions</name>      <internal_name>ci_twa_relation_1</internal_name>      <factory>ci_twa_relation</factory>      <default_query>tran_status=2 and id != 2000000000</default_query>      <date_field>last_mod_dt</date_field>   </main_obj>    <main_obj>      <name>CMDB Relation Inactive Transactions</name>      <internal_name>ci_twa_relation_2</internal_name>      <factory>ci_twa_relation</factory>      <default_query>delete_flag=1 and id != 2000000000</default_query>      <date_field>last_mod_dt</date_field>   </main_obj>    <main_obj>      <name>CMDB CI MDR Snapshot</name>      <internal_name>ci_mdr_snapshot_1</internal_name>      <factory>ci_mdr_snapshot</factory>      <default_query>delete_flag=0</default_query>      <date_field>last_mod_dt</date_field>   </main_obj><!--   End of CMDB Rules  -->


  • Save the file and recycle services.

  • After recycle confirm new objects added. Administration tab -> Archive and Purge -> Archive and Purge Rules (see Figure 1):

    Figure 1

    Figure 1