SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Utilities
HP NonStop SQL/MX Reference Manual540440-003
5-68
Examples of MXGNAMES
location $VOL1.ZSDA126B.BXNW1R00
hash partition by (c4)
( add location $VOL2.ZSDA126B.BXNW2R00
, add location $VOL3.ZSDA126B.BXNW3R00
, add location $VOL4.ZSDA126B.BXNW4R00 )
;
create unique index T126B_NDX1 on CAT.SCH.T126B(C2, C1)
LOCATION $vol1.ZSDA126b.qdx1g100
hash partition by (c2)
( add location $VOL2.ZSDA126B.QDX1G200
, add location $VOL3.ZSDA126B.QDX1G300
, add location $VOL4.ZSDA126B.QDX1G400
, add location $VOL5.ZSDA126B.QDX1G500 )
;
This example prepares a list of file names to be used with TMF. The input is a list
of fully qualified SQL names.
MXGNAMES -SQLNames=$VOL1.SQLSTUFF.SQLNAMES -output=NAMELIST -TMF
Suppose the contents of the file SQLNAMES are:
CAT.SCH.T126A
CAT.SCH.T126B
The output of the command is a file called NAMELIST which contains:
(-- Table CAT.SCH.T126A --&
$VOL1.ZSDA126A.BXNL1R*,&
$VOL2.ZSDA126A.BXNL2R*,&
$VOL3.ZSDA126A.BXNL3R*,&
$VOL4.ZSDA126A.BXNL4R*,&
$VOL5.ZSDA126A.BXNL5R*,&
$VOL6.ZSDA126A.BXNL6R*,&
-- Index T126A_NDX1 on CAT.SCH.T126A--&
$VOL1.ZSDA126A.QDXWG1*,&
$VOL2.ZSDA126A.QDXWG2*,&
$VOL3.ZSDA126A.QDXWG3*,&
$VOL4.ZSDA126A.QDXWG4*,&
-- End of table CAT.SCH.T126A--&
-- Table CAT.SCH.T126B--&
$VOL1.ZSDA126A.BXNW1R*, &
$VOL2.ZSDA126A.BXNW2R*, &
$VOL3.ZSDA126A.BXNW3R*, &
$VOL4.ZSDA126A.BXNW4R*, &
-- Index T126B_NDX1 on CAT.SCH.T126B-- &
$VOL1.ZSDA126A.QDX1G1*,&
$VOL2.ZSDA126A.QDX1G2*,&
$VOL3.ZSDA126A.QDX1G3*,&
$VOL4.ZSDA126A.QDX1G4*,&
$VOL5.ZSDA126A.QDX1G5* &
-- End of table CAT.SCH.T126B--)
This example prepares a list of file names to be used with TMF. The input is
SHOWDDL text.
MXGNAMES -Showddl=$VOL1.SQLSTUFF.SHOWD123 -output=NAMELST -TMF
Suppose the contents of the file SHOWD123 are:
CREATE TABLE CAT.SCH.T126A
(
C1 INT NO DEFAULT -- NOT NULL NOT DROPPABLE
, C2 TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP -- NOT NULL NOT
DROPPABLE
, C3 CHAR(4) CHARACTER SET ISO88591 COLLATE DEFAULT DEFAULT