CO 10.x automatically cleanup old log grabber execution

Version 7
    Share This:

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    PRODUCT:

    TrueSight Capacity Optimization


    COMPONENT:

    Capacity Optimization


    APPLIES TO:

    BMC TrueSight Capacity Optimization, TSCO 10.x



    PROBLEM:

     

    The folder deployment under repository is becoming too big.

     


    SOLUTION:

     

    Legacy ID:KA432876

      

    The folder deployment contains all the deployed Service Packs, Cumulative Patches, Fix Packs and Cumulative Hot Fixes that you deployed into your CO with also, when available the rollback, information. These are cleaned up automatically when there is a major upgrade.

      

    Also, this folder contains the log grabber execution and the task log collection. These files can be big and can be automatically cleaned up.

      

    This article works on TrueSight Capacity Optimization 10.0 only if you have installed CHF4 for CP1 or newer CHF
    Also, this solution is valid only for CO running on Oracle database

      

     1. TSCO 10.3 and earlier preliminary steps to unschedule the Database Cleaner

      
       
    • Locate the "Database Cleaner" into CO system tasks and edit it
      

      
       
    • Verify if it's part of the "maintenance activity chain", if so select the chain and unschedule it
      

      

      


    2. Update the Database Cleaner system task

      
       
    • Go back to the "Database Cleaner" configuration page and edit its run configuration into advanced mode
      

      

      

     

      

    3. Adding the custom cleanup queries into ETL run confguration

      
       
    • In the 'Add new property' field at the bottom of the page enter "DeploymentLog.custom.query" and click the 'Add' button.  That will add the 'DeploymentLog.custom.query' property with a value of "##INSERT VALUE###" in the top section.
    •  
    • Update the 'DeploymentLog.custom.query' property value to the following value: DELETE FROM DEPLOYMENT_LOG DL WHERE ((DL.INSERTTS < (SYSDATE - 90)) OR (DL.OPSTATUS = 'ENDED' AND DL.INSERTTS < (SYSDATE -30))) AND ((DL.DEPLACTIVITYID IN (5,27)) OR EXISTS (SELECT NULL FROM DEPLOYMENT_ACTIVITY DA WHERE DA.DEPLACTTYPE = 100 AND DL.DEPLACTIVITYID = DA.DEPLACTIVITYID))
      

    So, when you are done you'll have a new deployment property like this:

    DeploymentLog.custom.query = DELETE FROM DEPLOYMENT_LOG DL WHERE ((DL.INSERTTS < (SYSDATE - 90)) OR (DL.OPSTATUS = 'ENDED' AND DL.INSERTTS < (SYSDATE -30))) AND ((DL.DEPLACTIVITYID IN (5,27)) OR EXISTS (SELECT NULL FROM DEPLOYMENT_ACTIVITY DA WHERE DA.DEPLACTTYPE = 100 AND DL.DEPLACTIVITYID = DA.DEPLACTIVITYID))

    The above SQL will delete all reference from the database refer to log grabber execution older as 90 days regardless of the status and will delete all log grabber with an execution ended older as 30 days. Additionally it deletes all
    log references from the log of patch deployments, custom ETL modules deployments and custom db connections with the same conditions. This SQL only deletes the references from the Database, but actually not the file, on the file system.

      

      

      

    4. Enabling the custom cleanup queries

      

    Check the Database Cleaner Task properties to see if there is already a property called 'additional.tables'.

    If the 'additional.tables' property already exists and contains a value, then append the the string 'DeploymentLog' to that property.  The new 'DeploymentLog' string should be added after a semicolon since the additional.tables properly is a semicolon separated list of additional tables to be processed.

    If the 'additional.tables' property doesn't already exist then add it via the 'Add new properties' edit box at the bottom of the page and set the property value to 'DeploymentLog'

    Screenshot of additional.tables property.
    Save the updated Run Configuration by clicking the 'Save' button.

      

    5. Final steps

      
       
    • Save the updated Run Configuration by clicking the 'Save' button.
    •  
    • If you unscheduled the Maintenance activity chain (necessary in TSCO 10.3 and earlier to edit the Database Cleaner Run Configuration) go back into the Maintenance activity chain and reschedule it.
      

      

     


    Article Number:

    000097582


    Article Type:

    Solutions to a Product Problem



      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles