hvrcatalogexport - Export from hub database into HVR catalog document.
hvrcatalogimport - Import from HVR catalog document into hub database.
hvrcatalogexport [-cchn...] [-C] [-d] [-g] [-hclass] [-l] [-uuser] hubdb catdoc
hvrcatalogimport [-hclass] [-uuser] hubdb catdoc
Command hvrcatalogexport extracts information from the HVR catalog tables in the hub database and writes it into file catdoc. HVR catalog document catdoc is an XML file which follows the HVR catalog Document Type Definition (DTD).
You can export the information about:
- Locations (see the hvr_location catalog table)
- Channel Definitions (see the hvr_channel, hvr_table, hvr_column, hvr_loc_group and hvr_action catalog tables)
- Group Membership (see the hvr_loc_group_member catalog table)
- Configuration Action (see the hvr_config_action catalog table).
Configuration Actions are the actions defined at a location level. In HVR GUI, when an action is defined on a location (by right-clicking the location), the option Configuration Action is automatically selected in the New Action dialog. However, when an action is defined for a channel, location group or table (by right-clicking the channel, location group or table), the option Configuration Action needs to be manually selected in the New Action dialog to apply this action to a specific location.
You can select to export information from all the catalog tables or separately for each of the items from the above list.
Command hvrcatalogimport loads the information from the supplied HVR catalog document into the HVR catalogs in the hub database.
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.
An HVR catalog document file can either be created using command hvrcatalogexport or it can be prepared manually, provided it conforms to the HVR catalog DTD.
This section describes the options available for the commands hvrcatalogexport and hvrcatalogimport.
Only export catalog information for channel chn.
Only export information from configuration action catalog hvr_config_action.
Only export information from channel definition catalogs hvr_channel, hvr_table, hvr_column, hvr_loc_group and hvr_action.
Only extract information from group membership catalog hvr_loc_group_member.
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.
Only export information from location catalog hvr_location.
Connect to hub database using DBMS account user. For some databases (e.g. SQL Server) a password pwd must also be supplied.
HVR Catalog DTD
HVR catalog documents are XML files that must conform to the HVR catalog Document Type Definition (DTD). A formal specification of this DTD can be found in file HVR_HOME/lib/hvr_catalog.dtd. Most XML tags in the DTD are directly equivalent to a table or row of the HVR Catalog Tables.
The root tag of the HVR catalog DTD is <hvr_catalog>. This root tag contains "table" tags named <hvr_channels>, <hvr_tables>, <hvr_columns>, <hvr_loc_groups>, <hvr_actions>, <hvr_locations>, <hvr_loc_group_members> and <hvr_config_actions>. Most table tags contain a special optional attribute chn_name. This special attribute controls the amount of data that is deleted and replaced as the HVR catalog document is loaded into the catalog tables. For example, a document that contains <hvr_actions chn_name="hvr_demo01"> would imply that only rows for channel hvr_demo01 should be deleted when the document is imported. If the special attribute chn_name is omitted then all rows for that catalog table are deleted.
Each table tag contains tags that correspond to rows in the catalog tables. These 'row' tags are named <hvr_channel>, <hvr_table>, <hvr_column>, <hvr_loc_group>, <hvr_action>, <hvr_location>, <hvr_loc_group_member> and<hvr_config_action>. Each of these row tags has an attribute for each column of the table. For example, tag <hvr_tables> could contain many <hvr_table> tags, which would each have attributes chn_name, tbl_name and tbl_base_name.
Some attributes of a row tag are optional. For example, if attribute col_key of <hvr_column> is omitted it defaults to 0 (false), and if attribute tbl_name of tag <hvr_action> is omitted then it defaults to '*' (affect all tables).
Catalog document for channel definition.
Catalog document for group membership.
Catalog document for HVR locations.
Catalog Document Type Definition.