Saturday, August 16, 2008

Check for scheduled and running Discoverer jobs

# all jobs

SELECT F.USER_NAME||' '||R.BR_WORKBOOK_NAME||' '||R.BR_JOB_ID
FROM DISCOVR_APPS.EUL5_BATCH_REPORTS R, APPS.FND_USER F, DBA_JOBS J
WHERE F.USER_ID = SUBSTR(R.BR_CREATED_BY,2,4)
AND J.JOB = R.BR_JOB_ID
ORDER BY F.USER_NAME;

# running jobs

SELECT /*+ ordered */ J.SID, R.BR_JOB_ID, F.USER_NAME, R.BR_WORKBOOK_NAME
FROM DISCOVR_APPS.EUL5_BATCH_REPORTS R, APPS.FND_USER F, DBA_JOBS_RUNNING J
WHERE F.USER_ID = SUBSTR(R.BR_CREATED_BY,2,4)
AND J.JOB = R.BR_JOB_ID;