Calling HVR on the Command Line
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 -hclass. Valid values for class are db2, db2i, ingres, mysql, oracle, postgresql, sqlserver, 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 db2, db2i, ingres, mysql, oracle, postgresql, sqlserver, 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 db2hubdb channel hvrcommand-uusername/passwordhubdb 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 ingreshubdb channel | hvrinit -h ingres myhubdb hvr_demo | Ingres or Vectorwise hub database as myhubdb. |
hvrcommand-h mysql -uusername/passwordnode~port~hubdb channel | hvrinit -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. |
hvrcommandhubdb/passwordchannel hvrcommand hubdb/password@tnsname channel hvrcommand-h oraclehubdb/passwordchannel | hvrinit myhubdb/mypwd hvr_demo hvrinit myhubdb/mypwd@mytnsname 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-uusername/passwordnode~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 hvrcommandinstance\hubdbchannel hvrcommand node\instance\hubdbchannel hvrcommand-uusername/password\hubdbchannel hvrcommand-h sqlserverhubdb 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/passwordchannel | 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.