Steps to run Purge Script for CMS data :
----------------------------------------
The CMS data deletion involves Workorders deletion and Titles deletion.

1. Login as oracle user on the CMS DB server.

2. change directory to 

        cd /home/oracle/scripts/cms

3. If you want to run both Title and Work order follow the below steps.
 
   a) Specify the values for number of titles to be purged, title retension margin (days) and retension days for the work orders in the purge_cms_data.sh.

          TITLES_TOBE_DELETED      = Number of (soft deleted) titles are to be deleted under the batch from CMS database permanently.
          TITLE_RETENSION_MARGIN   = Number of days that a title must be soft deleted before selection for physical delete. 
          WORKORDER_RETENSION_DAYS = Number of days back from sysdate to retain the workorder data in CMS.


   b) Setup the purge job under oracle crontab as shown in the example. ( Hint: "crontab -e" command will allow to edit the crontab)
          
          20 1 * * * /home/oracle/scripts/cms/purge_cms_data.sh >> /home/oracle/scripts/cms/purge_cms.log




