How to debug the scheduled delete archive log job (Legacy KB ID CNC TS20245 )

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

Description:

Sometimes, the scheduled Delete Database Archive Logs job does not work. In some instances the Delete Database Archive Logs job runs fine from command line, thus we need a procedure to run debugging on the scheduled job.

Solution:

Here is the procedure:

  1. Disable any scheduled delete achieve Log jobs using below commands

    nhSchedule -list
    will show the job-id for the ' Delete Database Archive Logs' job
    nhSchedule -disable 100016

  2. Create a job type, please run the command exactly like below

    nhSchedule -defineType "Delete Arch Log in Debug mode" -load 100 -cmd '$NH_HOME/bin/sys/nhiDbMaint -u $NH_USER -d $NH_RDBMS_NAME -Dall -Dt -deleteArchiveLogs'

  3. Schedule the job using the newly created job type, please run the command exactly like below

    nhSchedule -schedule "Delete Arch Log in Debug mode" -time "3:00 AM" -period "1"

When the job runs, it will create a log file named Delete Arch Log in Debug mode.log in $NH_HOME/log directory, this log file need to be sent to CA support.