Due to testing requirements we have in our testing environment 10 times the productive Control-M jobnet with about 250 jobs each (everyone with unique application, table, condition, etc. name). Up to today we are updating them manually.
I created a small jobnet which copies the productive jobnet automatically by exporting it as xml-file (with utility exportdeftable), updating to corresponding values with some individual changes for each jobnet (with stream editor), which creates each time a new jobnet and importing the new tables to Control-M (with utility deftable), which works fine so far.
However, I could not find a way to overwrite or delete existing tables which gets the deftable utility to abort ("table xy already exists in database"). So each time I have to manually delete all old tables in the scheduling table manager to get a successful run.
Is there a utilty or a way to delete existing tables in a datacenter without deleting them in scheduling table manager?
Thanks for your help
Steve
How can I delete tables with Control-M utility?
- philmalmaison
- Nouveau
- Posts: 1148
- Joined: 08 Jun 2007 12:00
- Location: Ile de France
%ctmem63> deftable
Description: deftable
The deftable utility imports scheduling tables and groups into the
CONTROL-M/EM database, according to definitions supplied in an XML file.
Usage:
deftable [-USERNAME <user> [-PASSWORD <password>] | -PASSWORD_FILE <password>] -HOST <GUI> -SRC_FILE <XML> [/a][/o]
- or -
deftable [-u <user> [-p <password>] | -pf <password>] -s <GUI> -src <XML> [/a][/o]
Switches can be specified in any order.
OPTIONS:
/? Displays utility's description and available options.
/a Accept all. Directs the utility to automatically reset the Author parameter
to the current CONTROL-M/EM user when these two values do not match.
If not specified, the utility skips every job definition whose Author does
not match the currently logged in user.
/v Verbose messages.
/o Overwrites an existing table definitions in CONTROL-M/EM database,
or creates a new one if absence.
/t Operate on a single table at a time, to reduce process' memory.
Description: deftable
The deftable utility imports scheduling tables and groups into the
CONTROL-M/EM database, according to definitions supplied in an XML file.
Usage:
deftable [-USERNAME <user> [-PASSWORD <password>] | -PASSWORD_FILE <password>] -HOST <GUI> -SRC_FILE <XML> [/a][/o]
- or -
deftable [-u <user> [-p <password>] | -pf <password>] -s <GUI> -src <XML> [/a][/o]
Switches can be specified in any order.
OPTIONS:
/? Displays utility's description and available options.
/a Accept all. Directs the utility to automatically reset the Author parameter
to the current CONTROL-M/EM user when these two values do not match.
If not specified, the utility skips every job definition whose Author does
not match the currently logged in user.
/v Verbose messages.
/o Overwrites an existing table definitions in CONTROL-M/EM database,
or creates a new one if absence.
/t Operate on a single table at a time, to reduce process' memory.
I use the deftable option /o (and often the /a):
/a Accept all. The /a switch directs the utility to automatically reset the Author parameter to the current CONTROL-M/EM user when these two values do not match. If not specified, the utility skips (that is, does not process) job definitions whose Author does not match the currently logged in user.
/o Overwrite. The /o switch directs the utility to overwrite any existing tables.
/a Accept all. The /a switch directs the utility to automatically reset the Author parameter to the current CONTROL-M/EM user when these two values do not match. If not specified, the utility skips (that is, does not process) job definitions whose Author does not match the currently logged in user.
/o Overwrite. The /o switch directs the utility to overwrite any existing tables.
Hi,
It seems to me that the utility <cli> can't delete a Scheduling Table.
Try the <ctmpsm> utility with this syntax:
ctmpsm -SCHEDTAB -REMOVE <your Scheduling Table>
You received message like this when utility was executed:
Deleting Scheduling Table name '<your Scheduling Table>'
Note: Your table is deleted only from Control-M/Server , you can access them from the 'Scheduling Table Manager'.
It seems to me that the utility <cli> can't delete a Scheduling Table.
Try the <ctmpsm> utility with this syntax:
ctmpsm -SCHEDTAB -REMOVE <your Scheduling Table>
You received message like this when utility was executed:
Deleting Scheduling Table name '<your Scheduling Table>'
Note: Your table is deleted only from Control-M/Server , you can access them from the 'Scheduling Table Manager'.
Best regards
Walty
Walty
Hi,
I don't know exactly what is your situation but you can try:
1) Check if Scheduling Table exist in Control-M/S
ctmpsm -SCHEDTAB -LISTTABLE <your Scheduling Table>
2) If exist and you want to delete
ctmpsm -SCHEDTAB -REMOVE <your Scheduling Table>
3) Check if Scheduling Table exist by SQL in Control-M/EM Database (DEF_TABLES)
select DATA_CENTER, SCHED_TABLE, TABLE_ID from DEF_TABLES where SCHED_TABLE='<your Scheduling Table>'
4) If exist and you want to delete by SQL
delete from DEF_TABLES where SCHED_TABLE='<your Scheduling Table>' and TABLE_ID='<your_table_id>'
Note: The delete by SQL is not necessarily recommended, be careful
I don't know exactly what is your situation but you can try:
1) Check if Scheduling Table exist in Control-M/S
ctmpsm -SCHEDTAB -LISTTABLE <your Scheduling Table>
2) If exist and you want to delete
ctmpsm -SCHEDTAB -REMOVE <your Scheduling Table>
3) Check if Scheduling Table exist by SQL in Control-M/EM Database (DEF_TABLES)
select DATA_CENTER, SCHED_TABLE, TABLE_ID from DEF_TABLES where SCHED_TABLE='<your Scheduling Table>'
4) If exist and you want to delete by SQL
delete from DEF_TABLES where SCHED_TABLE='<your Scheduling Table>' and TABLE_ID='<your_table_id>'
Note: The delete by SQL is not necessarily recommended, be careful
Best regards
Walty
Walty