How to find the 'n' oldest jobs in the AM History table? i.e SO_JOB_HISTORY table.
The following SQL can be run against the AM database to find the 'n' oldest job in SO_JOB_HISTORY. For this example we have limited the results to the 10 oldest jobs.
select * from (select min(so_job_finished), so_module from so_job_history group by so_job_finished, so_module order by 1) a where rownum <= 10;
The '10' can be changed to get a different number of jobs.
This SQL is useful to confirm if the SYSTEM chain is deleting older records from the HISTORY table.