How can I delete tables with Control-M utility?

Everything about Control-M Enterprise Manager Server installation or setup.
Post Reply
User avatar
SteveR
Nouveau
Nouveau
Posts: 7
Joined: 15 May 2008 12:00

How can I delete tables with Control-M utility?

Post by SteveR » 30 Jan 2009 3:20

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. 8)

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

User avatar
schidl
Nouveau
Nouveau
Posts: 16
Joined: 11 Jun 2007 12:00
Location: Germany
Contact:

Post by schidl » 30 Jan 2009 4:29

Hi,

you can use the deftable switch /o:

/o Overwrite. The /o switch directs the utility to overwrite any existing tables.

Works since release 6.2.x.

Regards,
schidl

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

Post by philmalmaison » 03 Feb 2009 1:50

%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.

User avatar
mauriziog
Nouveau
Nouveau
Posts: 807
Joined: 08 Jun 2007 12:00
Location: Varese - Italy
Contact:

Post by mauriziog » 03 Apr 2009 7:05

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.

User avatar
arno76
Nouveau
Nouveau
Posts: 24
Joined: 29 Aug 2008 12:00

Post by arno76 » 21 Apr 2010 5:19

I'd like to remove table from controlM with the CLI, does anyone know how i can do?

because /o Overwrite mean that the table already exist

thanks

User avatar
Walty
Nouveau
Nouveau
Posts: 473
Joined: 20 Jan 2006 12:00

Post by Walty » 21 Apr 2010 6:16

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'.
Best regards
Walty

User avatar
arno76
Nouveau
Nouveau
Posts: 24
Joined: 29 Aug 2008 12:00

Post by arno76 » 22 Apr 2010 10:22

thanks for answer but not applicable for my probleme
is there an sql request which can do this delete everywhere?

User avatar
Walty
Nouveau
Nouveau
Posts: 473
Joined: 20 Jan 2006 12:00

Post by Walty » 22 Apr 2010 11:45

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
Best regards
Walty

Post Reply