ODBC Server Reference Manual

Creating Partitioned Tables
HP NonStop ODBC Server Reference Manual429151-002
F-2
Configuring for Partitioned Tables
Example Template
KEY (C1)
PARTITION ($volume1.SSSSSSSS.FFFFFFFF EXTENT 64 MAXEXTENTS 160 FIRST KEY -1000
,$volume2.SSSSSSSS.FFFFFFFF EXTENT 32 MAXEXTENTS 128 FIRST KEY 1000
,$volume3.SSSSSSSS.FFFFFFFF EXTENT 64 MAXEXTENTS 160 FIRST KEY 2222)
;
KEY (C1,C2)
PARTITION ($volume1.SSSSSSSS.FFFFFFFF CATALOG \N1.$DATA.SQL2CAT
FIRST KEY (-50,”AAAAA”)
,\N2.$volume1.SSSSSSSS.FFFFFFFF CATALOG \N2.$DATA.SQLCAT
FIRST KEY (50, “MMMMM”))
;
Configuring for Partitioned Tables
Create a Partition File Segment
The ADDPOS statement adds partition overlay specifications (POS) to an existing
partitioned table partition file. Any partition can be used, because the utility finds the
primary partition from the file’s header. It is most efficient to use the primary partition.
The POS is appended to the specified file; one or more partition files can be appended
in one statement. If template-file-name does not exist, the file is created.
If a POS is a duplicate of a previously added POS, the NonStop ODBC Server uses
the first POS that matches the primary key list.
If an error occurs, the statement is aborted and the original template-file-name is
unchanged.
Configure the ZNSSCFG File
If the ODBC system catalog is in $SYSTEM.SQL, use the following SQLCI statement
to configure the ZNSSCFG file.
INSERT INTO $SYSTEM.SQL.ZNSSCFG (ITEM,VALUE)
VALUES (“PK_MAP_FNM”,
“\N.$ODBC.POMAP.POMAP”)
If the ODBC system catalog is in $DATA1.ODBCSYS, use the following SQLCI
statement to configure the ZNSSCFG file.
INSERT INTO $DATA1.ODBCSYS.ZNSSCFG (ITEM,VALUE)
VALUES (“PK_MAP_FNM”,
“\N.$ODBC.POMAP.POMAP”)
Note that you must have read access rights to the POS template file, which is
$ODBC.POMAP.POMAP in this example.
nosutil ADDPOS template-file-name
[ [ $volume.]subvolume.]partition-table1
[ [ [ $volume.]subvolume.]partition-tablen ... ]