How to use exportdefcal utility to export the calendars from the Control-M Enterprise Manager Database?
Knowledge Article
How to use exportdefcal utility to export the calendars from the Control-M Enterprise Manager Database?
How to use exportdefcal utility to export the calendars from the Control-M Enterprise Manager Database?
Control-M/Enterprise Manager
Control-M/Enterprise Manager
Control-M/Enterprise Manager all versions
Control-M/Enterprise Manager
Control-M/Enterprise Manager
Control-M/Enterprise Manager all versions
How to use exportdefcal utility to export the calendars from the Control-M Enterprise Manager Database?
Please refer to the Control-M Workload Automation Utilities Guide for more information regarding exportdefcal.
1. Copy the below contents under "Additional Information" to a file. Replace "<Control-M Server Data Center Name>" with your Control-M Server Data Center Name For example, <PARAM NAME="DATACENTER" OP="EQ" VALUE="<Control-M Server Data Center Name>"/> To <PARAM NAME="DATACENTER" OP="EQ" VALUE="ctmserver"/>
2. Execute this command to export the calendar exportdefcal -u <EM User> -p <EM Pass> -s <GUI Server Name> -arg <Full Path to Arg File> -out <Full Path to Output File>
For example, Argurment File: C:\temp\arg_file.xml Output File: C:\temp\cal.out
This is the result:
exportdefcal -u emuser -p password -s gsrname -arg C:\temp\arg_file.xml -out C:\temp\cal.out 7 calendars were exported. Writing calendars to file C:\temp\cal.out
2. Modify the calendar output file as required.
3. Import the calendars using defcal u <EM User> -p <EM Pass> -s <GUI Server Name> -src <Full Path to source file>
For example, defcal -u emuser -p password -s gsrname -src C:\temp\cal.out
This will import all the updated calendars to the Control-M Enterprise Manager database.
Please be aware that the command is case sensitive, so all values must match exactly as defined in the corresponding environment.
Additional Information:
arg_file.xml format <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE TERMS SYSTEM "terms.dtd"> <TERMS> <TERM> <PARAM NAME="DATACENTER" OP="EQ" VALUE="<Control-M Server Data Center Name>"/> </TERM> </TERMS>
Note: This utility should not be used to export and import to a newer version of Control-M (upgrade) or a version of Control-M with a different fix pack. The import should be done on a Control-M machine with the same version and fix pack. The calendar definitions change from fix packs or versions and importing can cause problems with the data or corruption.