Hvreventtool
Since v5.6.0/0
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.
Parameter | Description |
---|---|
-aev_type | Add 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_name | Assign 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.
|
-f | Set event state as FAILED when adding (option -a) or editing (option -i) an event.
|
-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. |
-iev_id | Edit or change event. Event ID evid should be specified with this option. |
-lresult_loc_source | Add source location name in event result. This option can only be used when adding result (option -R) to an event. |
-Lresult_loc_target | Add target location name in event result. This option can only be used when adding result (option -R) to an event. |
-rev_responsetext | Add response text resptext for an event. This option can only be used when changing the event state using options -d and -f. |
-Rresult | Add result for an event. |
-tresult_table | Add the table in event result. This option can only be used when adding result (option -R) to an event. |
-Tev_textdescr | Add 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 2018-12-12T23:59:59.000Z -f -r "Manually cancelling because of ..." myhub/myhubpwd
To change an event's state from PENDING to DONE:
hvreventtool -i 2018-12-12T23:59:59.000Z -d -r "Took 1 hour" myhub/myhubpwd
To add a custom event (default is PENDING state):
hvreventtool -a myhub/myhubpwd TakingBackup