Export all Control-M jobs via SQL command

Everything about Control-M agents installation or setup.
Post Reply
User avatar
users
Nouveau
Nouveau
Posts: 1
Joined: 17 Nov 2009 12:00

Export all Control-M jobs via SQL command

Post by users » 17 Nov 2009 3:47

Hello everyone,

I just found this forum and I find it amazing! I'm new to Control-M but I hope to improve my knowledge by reading all the usefull information in here.

Can someone tell me if there is some way to export all Control-M jobs via SQL command (as we can do in Control-M Desktop by exporting all jobs to a csv file) ?

Thanks for your attention

Regards,

--

Y-a-t'il un moyen d'exporter via une requête/commande SQL la liste de tous les jobs Control-M (du genre export vers fichier csv sous Control-M Desktop) ?

Merci d'avance

Cordialement,

User avatar
rahulsehgal
Nouveau
Nouveau
Posts: 148
Joined: 19 Mar 2009 12:00
Location: Delhi
Contact:

Post by rahulsehgal » 18 Nov 2009 11:37

Hi,

You can run this SQL Command to retieve all the job definitions defined in Control-M /EM, Login to Control-M/EM Database and run this SQL Query:-

Select * from DEF_JOB;

Regards,
Rahul Sehgal

User avatar
philmalmaison
Nouveau
Nouveau
Posts: 1148
Joined: 08 Jun 2007 12:00
Location: Ile de France

Post by philmalmaison » 24 Nov 2009 5:47

no you must use the controlm em server to do it, so you have all concerned tables even if they're not upload in controlm server.

do a list of tables in EM SERVER like:

isql -U <emuser> -P <empassword> <<EOF> liste_tables.out
select SCHED_TABLE from DEF_TABLES
where
DATA_CENTER = "datacenter name"
go
EOF

and after removing headers and count row (just living tables names)

cat liste_tables.out | while read table
do
ecd util -U<emuser> -P<empassword> -defexport -table ${table} -dcname "datacenter name" -file yourdirectory.out
done

regards
philmalmaison

Post Reply