Hvrstart

From HVR
Jump to: navigation, search
Commands
Previous: hvrscheduler
Next: hvrstatistics
Command Reference

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 (if option –i is used) they are run directly by the hvrstart 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 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 first argument hubdb specifies the connection to the hub database. This can be an Oracle, Ingres, SQL Server, DB2, DB2 for I, PostgreSQL or Teradata database depending on its form. See further section Calling HVR on the Command Line.

Options

Parameter Description
–C pub_cert Public certificate for encrypted connection to hub machine. This must be used with option –R.
–E nm=val Set environment variable nm to value val.
–h class Specify hub database class. Valid values are oracle, ingres, sqlserver, db2, db2i,postgresql, or teradata. For more information, see section Calling HVR on the Command Line.
–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.
–K pair 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.
–L login/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.
–R node:port Remote hub machine node name and TCP/IP port number. Must be used with option –Llogin/pwd.
–t N 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.
–U user [/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. It is not needed when not 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.

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–loc1loc2

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.

Files

Folder-icon.png HVR_CONFIG
└─ Folder-icon.png log
└─ Folder-icon.png hubdb
├─ hvr.ctrl Audit log containing hvrstart actions.
└─ hvr.out Log of job output and errors.