SQL/MX 2.x Installation and Management Guide (G06.24+, H06.03+)
Performing Recovery Operations
HP NonStop SQL/MX Installation and Management Guide—523723-004
12-34
Examples of Using FIXUP
partition of a table). If the restored partition has a different redefinition timestamp than
the rest of the object, use FIXUP to set the redefinition timestamp to the correct value.
Examples of Using FIXUP
Suppose that table1 is located in the catalog cat and the schema sch and has three
partitions. Two of the partitions are located on the local node, \local. The third partition
is located on a remote node, \remote, and contains a trigger that requires a trigger
temporary table, which is located on the local node. Two indexes are also associated
with the table: index1 and index2. Each index has three partitions organized similarly to
those of the table.
1. Create three partitions with these names:
•
\LOCAL.$DATA02.ZSD1123U.SUEIFO00
•
\LOCAL.$DATA01.ZSD1123U.SUEIGO00
•
\REMOTE.$DATA01.ZSD1123U.SUEIHO00
CREATE TABLE cat.sch.table1
(Col1 int not null primary key,
Col2 int not null,
Col3 timestamp not null no default, Col4 char (20))
Partition
(Add first key (1000) location \local.$data01 name part2,
Add first key (2000) location \remote.$data01 name part3)
Location \local.$data02 name part1;
2. Create three partitions with these names:
•
\LOCAL.$DATA03.ZSDWUEIR.SUDIFO00
•
\LOCAL.$DATA02.ZSDWUEIR.SUDIFP00
•
\REMOTE.$DATA02.ZSDWUEIR.SUDIFQ00
CREATE INDEX index1 (col2) ON table1 Location
\local.$data03 name i1part1
Partition
(add first key (1000) location \local.$data02 name
i1part2,
Add first key (4000) location \remove.$data02 name
i1part3);
3. Create three partitions with these names:
•
\LOCAL.$DATA02.ZSDJFKEO.SJDIFL00
•
\LOCAL.$DATA04.ZSDJFKEO.SJDIFM00
•
\REMOTE.$DATA04.ZSDFHKEO.SJDIFN00
CREATE INDEX index2 (col3) on table1
Location \local $data02 name i2part1
Hash partition (add location \local.$data04 name i2part2,
Add location \remote.$data04 name i2part3);
4. Create a work file with the name \LOCAL.$DATA02.ZSDLSKFE.IEOFKS00:
CREATE TRIGGER...