This topic contains the following subtopics:

Generating command line scripts

Each job editor has a Generate Command Line button to launch the Script Generation Wizard, which helps you create batch files that automatically run one or more jobs.

By default, each command line script picks up the name of its job. You can specify output files in CSV, XML, RTF, HTML, or PDF format.

The Report Directory column indicates the location where reports are created.

The Store Results column indicates whether the job results are saved once the job has executed.

Make sure that the job has been saved.

To create a script file

  1. In the job editor, select the Generate Command Line icon located in the upper-right hand corner.
  2. In the Script Generation Wizard, locate the job in the table.
  3. Check the job report output format you prefer.
  4. Click and specify the Report Directory where you want to store the report file.
    If you want to create a batch file to run multiple jobs, click Add, and then add the other jobs.
    If needed, reorder the jobs using the Remove, Up, and Down buttons. For example, an archive needs to be created before its version can be used in a comparison job.
  5. Click Next.
  6. Click and specify the location where you want to store the batch script file.
  7. Select the script format, .bat or .xml.
  8. Click Finish. The job immediately runs.

Using the changec Command Line Program

The changec command line program runs DB Change Manager job scripts. It is located in the DB Change Manager installation directory.

changec options include:

  • The -job option specifies the jobs to run. Its parameter is the fully-qualified job file name and location.
  • The -output option specifies reporting format for the job. Its parameters are: CSV, XML, RTF, HTML, or PDF.
  • The optional -dontstore flag specifies that the results for the job are not stored.

For example, the syntax below runs the MyConfigCompare database comparison job and generates a report in PDF format:

-job
“C:\Users\test1\change_workbench_5_0\workspace\DatabaseChange\MyConfigCompare.dcj”
-output PDF “c:/report”

To execute multiple jobs from the same command line, use the following syntax:

changec -bulk bulk_file_name

Where bulk_file_name is a file where each row has a -job option. The -job option accepts these regular expressions:

  • ** indicates all sub folders in a directory location
  • * indicates any string

For example, the following command runs all jobs in all projects and folders in the workspace:

changec -job workspace:\**\*.caj

To run a job from the command line:

  • From the command line, enter a command with the following format:
    changec -job “path_and_name.dcj” -output report_format “ report_directory_path”
    The job immediately runs and saves the report in the specified directory.


IDERA |  Products | Purchase | Support |  Community |  Resources |  About Us  | Legal