Hvreventtool

Last updated on Dec 23, 2020

  Since    v5.6.0/0  

Contents

Name

hvreventtool - Manage HVR events

Synopsis

hvreventtool [-options[-h class] [-u user]  hubdb

Description

Command hvreventtool allows you to manage (add/edit/change state) events. The primary use of this command is to cancel events which are long running/not responding.

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.

Events are any user action/activity that makes changes in HVR. HVR events are maintained in catalog tables hvr_event and hvr_event_result in hub database. Following are the different states of HVR Events - 

  • PENDING - Indicates an event is in pending state.
  • DONE - Indicates an event is completed/finished.
  • FAILED - Indicates an event is cancelled/failed.

Sample event:

"2019-06-07T12:31:46.475Z": {
    "type": "Refresh_Classic_Command",
    "user": "admin",
    "description": "HVR Refresh",
    "channel": "hvr_demo",
    "state": "DONE",
    "start_tstamp": "2019-06-07T12:31:46.475Z",
    "finish_tstamp": "2019-06-07T12:31:46.475Z",
    "body": {"os_user":"admin","channel":"hvr_demo","source_loc":"src","target_locs":["tgt"],"tables":["dm_order","dm_product"],"options":["-g b","-P 2","-s","-r src"]}
  }

Options

This section lists and describes all options available for hvreventtool.

ParameterDescription
-aev_typeAdd or create a new event. Event type ev_ype should be specified with this option. The default state of a new event is PENDING.

-bev_body

Add event body in JSON format for an event. This can be used only when adding (option -a) a new event.
-cchn_nameAssign channel chn for an event. This can be used only when adding (option -a) a new event.
-d

Set event state as DONE without a response text when adding (option -a) or editing (option -i) an event.

  • When adding a new event, the new event is created in DONE state.
  • When editing an event, change the state from PENDING to DONE.
-f

Set event state as FAILED when adding (option -a) or editing (option -i) an event.

  • When adding a new event, the new event is created in FAILED state.
  • When editing an event, change the state from PENDING to FAILED.
-hclass

Location class of the hub database. Valid values for class are db2db2iingresmysqloraclepostgresqlsqlserver, or teradata. For more information, see Calling HVR on the Command Line.

-iev_idEdit or change event. Event ID evid should be specified with this option.
-lresult_loc_sourceAdd source location name in event result. This option can only be used when adding result (option -R) to an event.
-Lresult_loc_targetAdd target location name in event result. This option can only be used when adding result (option -R) to an event.
-rev_responsetextAdd response text resptext for an event. This option can only be used when changing the event state using options -d and -f.
-RresultAdd result for an event.
-tresult_tableAdd the table in event result. This option can only be used when adding result (option -R) to an event.
-Tev_textdescrAdd description for an event. This can be used only when adding (option -a) a new event.
-uuser[/pwd]Connect to hub database using DBMS account user. For some databases (e.g. SQL Server) a password must also be supplied.

Example

  • To change an event's state from PENDING to FAILED :

    hvreventtool -i -f -r "Manually cancelling because of ..." myhub/myhubpwd 2018-12-12T23:59:59.000Z
  • To change an event's state from PENDING to DONE:

    hvreventtool -i -d -r "Took 1 hour" myhub/myhubpwd 2018-12-12T23:59:59.000Z
  • To add a custom event (default is PENDING state):

    hvreventtool -a myhub/myhubpwd TakingBackup

See Also

Events, Hvreventview