Command Line Interface

A collection of command line utilities are provided with OEDQ in the file jmxtools.jar.

The commands in jmxtools.jar can be used from the location where OEDQ is installed. The command syntax is as follows:

java.exe -jar jmxtools.jar <command> <arguments> <argument options>

Each command can take a range of different arguments, which are case sensitive.

Commands, arguments and options

This section lists all of the commands available using the Command Line tool, and any arguments used by each command.

Click on any of the commands for details:

droporphans

The droporphans command is used to remove any orphaned results tables. See the topic Identifying and removing orphaned results tables for more information.

The droporphans command takes several additional arguments as follows:

Option Use
-u user name The -u argument specifies the user name to use to connect to the OEDQ server. The user must have permission to cancel jobs and must have permission to the project containing the job.
-p password The -p argument is used to specify the connecting user's password. If the -p option is not set, OEDQ will prompt the user for the password.
server:port The server and port values are the server name, and the port number of the JMX (management) interface, respectively.

listorphans

The listorphans command is used to identify any orphaned results tables. See the topic Identifying and removing orphaned results tables for more information. The listorphans command takes the same arguments as the droporphans command above.

scriptorphans

The scriptorphans command creates a list of SQL commands for dropping orphaned results tables. This is useful if you wish to review exactly which commands will run on the Results database when you drop tables, or if you wish to drop the tables yourself manually.

list

The list command lists all the available commands.

runjob

The runjob command runs a named job in the same way as if running the job using the Director UI. The runjob command takes several additional arguments as follows:

Argument Use
-job job name The -job argument specifies the name of the job to run.
-project project name The -project argument specifies the name of the project that contains the job
-u user name The -u argument specifies the user name to use to connect to the OEDQ server. The user must have permission to run jobs and must have permission to the project containing the job.
-p password The -p argument is used to specify the connecting user's password. If the -p option is not set, OEDQ will prompt the user for the password.
-nolockwait The -nolockwait argument takes no extra values. It indicates that if any of the resources used by the job are locked, the job should not wait for them to become available. Instead, it should terminate with a failure code and return control to the command line.
-nowait The -nowait argument takes no extra values, and indicates that the command line should not wait for the job to complete.
server:port The server and port values are the server name, and the port number of the JMX (management) interface, respectively.

 

runopsjob

The runopsjob command runs a named job in the same way as if running the job using the Server Console UI. This provides additional functionality to the runjob command - specifically the use of Run Labels and Run Profiles. Run Labels may be used to store results separately from other runs of the same job. Run Profiles may be used to override externalized configuration settings at runtime.

The runopsjob command takes several additional arguments as follows:

Argument Use
-job job name The -job argument specifies the name of the job to run.
-project project name The -project argument specifies the name of the project that contains the job
-u user name The -u option specifies the user name to use to connect to the OEDQ server. The user must have permission to run jobs and must have permission to the project containing the job.
-p password The -p argument is used to specify the connecting user's password. If the -p option is not set, OEDQ will prompt the user for the password.
-nolockwait The -nolockwait argument takes no extra values. It indicates that if any of the resources used by the job are locked, the job should not wait for them to become available. Instead, it should terminate with a failure code and return control to the command line.
-nowait The -nowait argument takes no extra values, and indicates that the command line should not wait for the job to complete.
-runlabel run label name The -runlabel argument specifies the name of the run label under which you wish to store staged output results. Note that this will override any run label that is specified in a run profile or by -D runlabel = run label name.
-props run profile name The -props argument specifies the full path to a run profile properties file containing override settings for externalized configuration options in the job.
-D externalized option = value The -D argument allows you to override specific externalized options for the job individually. The syntax for the externalized options and values is the same as used in run profile properties files, though note that characters will be interpreted by the command line, so some characters will need to be escaped according to the shell conventions of your environment. Note that any individually specified externalized option settings will override any settings for the same option if these are specified in a run profile used in the same run.
server:port The server and port values are the server name, and the port number of the JMX (management) interface, respectively.

showlogs

The showlogs command starts a small GUI application which allows user session logs to be retrieved.

shutdown

The shutdown command shuts down all real-time jobs; that is jobs that are running from real-time record providers (web services or JMS).

This takes several additional arguments as follows:

Option Use
-u user name The -u argument specifies the user name to use to connect to the OEDQ server. The user must have permission to cancel jobs and must have permission to the project containing the job.
-p password The -p argument is used to specify the connecting user's password. If the -p option is not set, OEDQ will prompt the user for the password.
-nowait The -nowait argument takes no extra values, and indicates that the command line should not wait for the job to complete.
server:port The server and port values are the server name, and the port number of the JMX (management) interface, respectively.

 

Example command

The following example command runs a job from the command line interface:

java.exe -jar jmxtools.jar runjob -job Job1 -project ClientProject
-u adminuser -p adminpassword server:9005

 

This command specifies that:

Note: Any names (such as project or user names) that contain spaces must be encased in double quotes in the command syntax. For example, if the project containing the job that you want to call is named 'Master Data Analysis' the command must use the syntax '...-project "Master Data Analysis"...'

Exit status

When a job is completed, an exit status (0 or 1) is returned. An exit status of 0 indicates the job completed successfully, and an exit status of 1 indicates that there was a failure in the Job.

Example Windows batch file

The following example syntax for a Windows batch file shows a simple way of calling a named job in OEDQ, and using the returned exit status to display an error message where the job failed:

@ECHO OFF

java -jar jmxtools.jar runjob -job [Job Name] -project [Project Name] -u [User Name] -p [Password] [Server Name]:9005

IF ERRORLEVEL 1 GOTO error

ECHO Job ran successfully

GOTO end

:error

ECHO An error occurred running the job

:end

Oracle ® Enterprise Data Quality Help version 9.0
Copyright © 2006,2012, Oracle and/or its affiliates. All rights reserved.