Page 1 of 1

Find Jobs which Use a Particular Env Variable.

Posted: Wed Jan 17, 2007 12:06 pm
by DeepakCorning
I just wanted to know that is there a way to find out all the jobs which use a Particular Environment Variable??
For EG. If I have 50 Jobs and 25 of them use Environment variable DATABASE_TYPE then is there way to get list of all those tables??

Posted: Wed Jan 17, 2007 3:49 pm
by ray.wurlod
Nothing out of the box. You could use something like Kim Duke's parameter navigator to search, or a search on DS_JOBS and DS_JOBOBJECTS modelled on some of the queries posted here.

Posted: Wed Jan 17, 2007 4:29 pm
by DeepakCorning
Can you provide me some links...I will try to search as well.. THanks..

Posted: Wed Jan 17, 2007 4:37 pm
by I_Server_Whale
Kim Duke's website, where you can learn more about 'Parameter Navigator'. http://Duke-Consulting.com.

Posted: Wed Jan 17, 2007 4:44 pm
by kumar_s
Very recently we had discussion on that. Kim had posted such code

Code: Select all

SELECT
   DS_JOBS.NAME AS JOB_NAME,
   DS_JOBS.CATEGORY,
   DS_JOBOBJECTS.NAME AS OBJECT_NAME,
   DS_JOBOBJECTS.OLETYPE,
   EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'DATABASE_TYPE',1) > 0 then 'FOUND' else ''" AS FOUND FMT '5L'
FROM
   DS_JOBS,
   DS_JOBOBJECTS
WHERE
   DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDNO
   and FOUND = 'FOUND'
GROUP BY
   JOB_NAME,
   DS_JOBS.CATEGORY,
   OBJECT_NAME,
   DS_JOBOBJECTS.OLETYPE,
   FOUND
; 

Posted: Wed Jan 17, 2007 6:59 pm
by kduke
Three mentions in one post and I don't even have to answer the post. Thanks. 8)

Posted: Wed Jan 17, 2007 7:01 pm
by kumar_s
That shows how popular Kim and Kim's code are. 8)