Calling HVR on the Command Line

Last updated on Jul 09, 2020

Many HVR commands take a hub database name (e.g., myhubdb) as their first argument. HVR supports the creation of a hub database on certain databases (location classes) only. For the list of supported location classes, see section Hub Database in Capabilities.

Along with the hub database name argument (hubdb), the location class of the hub database can be explicitly specified in the command line using option -hclassValid values for class are db2db2iingresmysqloraclepostgresqlsqlserver, or teradata.

Alternatively, the location class of the hub database can be set by defining the environment variable HVR_HUB_CLASS. Valid values for this environment variable are db2db2iingresmysqloraclepostgresqlsqlserver, or teradata. Refer to the operating system documentation for the steps to set the environment variables.

The following table lists (location class wise) the syntax for using the hub database argument (hubdb) in the command line interface (CLI). Sometimes a DBMS password may be required as a command line argument. These passwords can be supplied in an encrypted form using the command hvrcrypt to prevent them being visible in the process table (for example with Unix command ps).

Syntax

Example

Description

hvrcommand -h db2 hubdb channel

hvrcommand -u username/password hubdb channel

hvrinit -h db2 myhubdb hvr_demo

hvrinit -u myuser/mypwd myhubdb hvr_demo

DB2 hub database as myhubdb.

A username and password (of the hub database) can be supplied with option –u.

hvrcommand -h ingres hubdb channel

hvrinit -h ingres myhubdb hvr_demo

Ingres or Vectorwise hub database as myhubdb.

hvrcommand -h mysql -u username/password node~port~hubdb channelhvrinit -h mysql -u myuser/mypwd mynode~3306~myhubdb hvr_demo

MySQL hub database as myhubdb.

A username and password (of the hub database) is supplied with option –u.

hvrcommand hubdb/password channel

hvrcommand hubdb/password @tnsname channel

hvrcommand -h oracle hubdb/password channel

hvrinit myhubdb/mypwd hvr_demo

hvrinit myhubdb/[email protected] hvr_demo

hvrinit -h oracle myhubdb/mypwd hvr_demo

Oracle schema as myubdb with password mypwd. Note that in the first example HVR recognizes this as Oracle, because of the forward slash.

hvrcommand -h postgresql -u username/password node~port~hubdb channel

hvrinit -h postgresql -u myuser/mypwd mynode~5432~myhubdb hvr_demo

PostgreSQL hub database as myhubdb.

A username and password (of the hub database) is supplied with option –u.

hvrcommand \hubdb channel

hvrcommand instance\hubdb channel

hvrcommand node\instance\hubdb channel

hvrcommand -u username/password \hubdb channel

hvrcommand -h sqlserver hubdb channel

hvrinit \myhubdb hvr_demo

hvrinit inst\myhubdb hvr_demo

hvrinit mynode\myinst\myhubdb hvr_demo

hvrinit -u myuser/mypwd \myhubdb hvr_demo

hvrinit -h sqlserver myhubdb hvr_demo

SQL Server hub database myhubdb. Note that HVR recognizes this as SQL Server because of the back slash.

A SQL Server node and SQL Server instance can be added with extra back slashes.

A username and password (of the hub database) can be supplied with option –u.

hvrcommand -h teradata node~username/password channel

hvrinit -h teradata mynode~myuser/mypwd hvr_demo

Teradata schema as myuser on mynode.

Certain HVR commands can also be performed inside HVR's Graphical User Interface (HVR GUI). In such command's GUI dialog, the equivalent command is displayed at the bottom of the dialog window.