Hvrstart
Name
hvrstart - Start jobs.
Synopsis
hvrstart [-options] hubdb jobs…
Description
Command hvrstart causes HVR jobs to be run. The jobs are either run via the HVR Scheduler or they are run directly by using hvrstart -i command. Jobs can either be specified explicitly (e.g. chn-cap-locx) or they can be partially specified (e.g. chn-cap which matches all capture jobs). If only a channel (chn) name is specified, then hvrstart runs the chn-cap jobs and then the chn-integ jobs.
If the jobs are run via the scheduler (no -i option), then jobs in a SUSPEND state are immune unless option -u is used. Jobs in state FAILED or RETRY are also immune unless option -r is used. In this mode, the HVR Scheduler process must already be running. If the job is already running, then the Scheduler will force the job to wake up and perform a new replication cycle.
The argument hubdb specifies the connection to the hub database. For more information about supported hub databases and the syntax for using this argument, see Calling HVR on the Command Line.
Options
This section describes the options available for command hvrstart.
Parameter | Description |
---|---|
-Cpub_cert | Public certificate for encrypted connection to hub machine. This must be used with option -R. |
-Enm=val | Set environment variable nm to value val. |
-hclass | Location class of the hub database. Valid values for class are db2, db2i, ingres, mysql, oracle, postgresql, sqlserver, or teradata. For more information, see Calling HVR on the Command Line. This option is only required when option -i is used for running compare or refresh jobs. |
-i | Interactive. The HVR job is run directly instead of via HVR Scheduler. The job's output and errors are sent to stdout and stderr. |
-Kpair | SSL public certificate and private key of local machine. If pair is relative, then it is found in directory $HVR_HOME/lib/cert. Value pair specifies two files; the names of these files are calculated by removing any extension from pair and then adding extensions.pub_cert and.priv_key. For example, option -Khvr refers to files $HVR_HOME/lib/cert/hvr.pub_cert and $HVR_HOME/lib/cert/hvr.priv_key. |
-Llogin/pwd | Login/password for remote hub machine. Must be used with option -Rnode:port. |
-r | Retry FAILED or RETRY jobs by triggering them with value 2 in column job_trigger of catalog hvr_job. This option cannot be used with option -i. |
-Rnode:port | Remote hub machine node name and TCP/IP port number. Must be used with option -Llogin/pwd. |
-tN | Time-out after N (> 0) seconds if scheduler or job takes too long, or if network is hanging. Job execution is not interrupted by this client timeout. If no -t option is supplied then hvrstart will wait indefinitely. This option cannot be used with option -i. |
-u | Unsuspend. This option cannot be used with option -tN or -i. |
-Uuser[/pwd] | Connect to hub database using DBMS account user. For some databases (e.g. SQL Server) a password /pwd must also be supplied, but only when running compare or refresh jobs. This option is only required when option -i is used for running compare or refresh jobs. |
-w | Wait until all triggered jobs which were selected have finished running or have completed a full replication cycle. While hvrstart is waiting for a job, its output is carbon-copied to the hvrstart command's stdout and stderr. This option cannot be used with option -i. |
Exit Codes
0 | Success. If option -i is not used, then a success just means that the HVR Scheduler was able to run the jobs, not that the job succeeded. |
1 | Failure. If option -i is not used, then this means error sending instruction to HVR Scheduler server, job did not exist, etc. |
2 | Time-out. |
3 | Jobs existed in state FAILED , RETRY , ERROR , ALERTING or SUSPEND which were not affected by the command. |
Example
Run a capture job from the command line, without the HVR Scheduler:
hvrstart -i hubdb chn-cap-loc
Run all integrate jobs via the HVR Scheduler:
hvrstart hubdb chn-integ
Run all capture jobs and then all integrate jobs from the command line:
hvrstart -i hubdb chn
Run a refresh job from the command line:
hvrstart -i -h sqlserver -U user/pwd hubdb chn-refr-loc1-loc2