Sql tables and catalogs, Example 1, Example 2 – HP NonStop G-Series User Manual
Page 42: Sql index tables
One-time Synchronization
HP AutoSYNC User’s Guide—522580-015
3-6
SQL Tables and Catalogs
Example 1
File $DATA.DB.ACCT has one alternate key, $DATA.DB.ACCTAK. The following
command synchronizes both the file ACCT and its alternate key ACCTAK to
$BACKUP.DBBACK on the destination system:
Note that no MAPNAMES file is required.
Example 2
File $DATA.DB.ACCT has its alternate key ACCTAK on subvolume $KEYS.DBKEYS.
To synchronize the file and alternate key file to identically named files on the
destination system, use the following command:
To synchronize the $DATA.DB.ACCT and its alternate key file to different volumes and
subvolumes on the destination system, use the following SYNC commands, specifying
a MAPNAMES file to describe the mapping of the volume and subvolume names:
SQL Tables and Catalogs
If a SQL table is duplicated, it must be registered in a SQL catalog. If the
synchronization is local (source system and destination system are the same), the
same catalog is used. If the destination is remote, and a catalog that has the same
name exists on the destination, the destination’s catalog is used.
You may specify a specific SQL catalog through the CATALOG option or by adding
CATALOGS entries in the mapnames-file of the MAPNAMES option. See paragraph
File and Catalog Name Mapping using MAPNAMES
on page 3-9 below for details.
The SQL catalog, whether specified or not, can be automatically created by using the
AUTOCREATECATALOG option.
SQL Index Tables
If you synchronize a SQL table, any indexes defined for that table are implicitly
synchronized with the SQL base table as follows:
•
If the index tables reside on the same subvolume in the source file set, they are
synchronized with the base table.
SYNC $DATA.DB.ACCT* to \REMOTE.$BACKUP.DBBACK.*;
SYNC $*.DB*.ACCT* TO \REMOTE.*.*.*;
SYNC $DATA.DB.ACCT TO \REMOTE.$BACK.*.*, MAPNAMES mapacct...;
SYNC $KEYS.DBKEYS.ACCTAK TO \REMOTE.$BACKEYS.*.*, MAPNAMES mapacct...;
where the MAPNAMES file mapacct contains the following entries:
$DATA TO $BACK
$KEYS TO $BACKEYS