Задание 2. Исправление логических индексных повреждений
Представьте, что в австралийской секции таблицы Customer возникли логические повреждения индексов. В этом задании вам необходимо исправить индексные повреждения в этой секции.
- Запустите утилиту PROUTIL IDXFIX на базе данных sportsco:
proenv>proutil sportsco -C idxfix OpenEdge Release 12.0 as of Fri Feb 22 19:02:39 EST 2019 Index Fix Utility 1. Scan records for missing index entries with index block validation. 2. Scan indexes for invalid index entries. 3. Both 1 and 2 above. 4. Cross-reference check of multiple indexes for a table. 5. Build indexes from existing indexes. 6. Delete one record and its index entries. 8. Scan records for missing index entries. q. Quit. Enter selection:
- В меню Index Fix Utility выберите пункт три, для сканирования записей и индексов на предмет наличия потерянных или некорректных индексных ключей (3. Both 1 and 2 above.). Откроется следующий уровень меню:
Enter selection: 3 Select one of the following: -------------------- All (a/A) - Choose all the indexes Some (s/S) - Choose only some of the indexes By Area (r/R) - Choose indexes in selected areas By Schema (c/C) - Choose indexes by schema owners By Table (t/T) - Choose indexes in selected tables By Partition (p/P) - Choose indexes in selected table partitions By Activation (v/V) - Choose active or inactive indexes -------------------- Quit (q/Q) Enter your selection:
- Выберите пункт Choose indexes in selected table partitions, для этого введите p и нажмите Enter.
Enter your selection: p Choose Table Partitions to Fix Indexes ---------------------------------------------------------------------------------------------------------------------- Option| Table Name | Table Owner | Partition Name : ID |Number ---------------------------------------------------------------------------------------------------------------------- 1|Customer |PUB |Customer-1:1 | 4 2|Customer |PUB |Customer-2:2 | 4 3|Customer |PUB |Customer-3:3 | 4 4|Customer |PUB |Customer-4:4 | 4 5|Customer |PUB |Customer-5:5 | 4 6|Customer |PUB |Customer-6:6 | 4 7|Customer |PUB |Customer-7:7 | 4 8|Customer |PUB |Customer-8:8 | 4 9|Customer |PUB |Customer-9:9 | 4 10|Customer |PUB |Customer-10:10 | 4 11|Customer |PUB |Customer-11:11 | 4 12|Customer |PUB |Customer-12:12 | 4 13|Customer |PUB |Customer-13:13 | 4 14|Customer |PUB |Customer-14:14 | 4 15|Customer |PUB |Customer-15:15 | 4 16|Customer |PUB |Customer-16:16 | 4 17|Customer |PUB |Customer-17:17 | 4 18|Customer |PUB |Customer-18:18 | 4 19|Customer |PUB |Customer-19:19 | 4 20|Customer |PUB |Customer-20:20 | 4 21|Customer |PUB |Customer-21:21 | 4 22|Customer |PUB |Customer-22:22 | 4 23|Customer |PUB |Customer-23:23 | 4 24|Order |PUB |Order-12:1 | 13 25|Order |PUB |Order-11:2 | 13 ---------------------------------------------------------------------------------------------------------------------- Page 1 of 2 Input Your Choice (c/C) - Change Display (a/A) - All (n/N) - Next Page (q/Q) - Quit (g/G) - Go n Choose Table Partitions to Fix Indexes ---------------------------------------------------------------------------------------------------------------------- Option| Table Name | Table Owner | Partition Name : ID |Number ---------------------------------------------------------------------------------------------------------------------- 26|Order |PUB |Order-9:4 | 13 27|Order |PUB |Order-8:5 | 13 28|Order |PUB |Order-7:6 | 13 29|Order |PUB |Order-1:7 | 13 30|Order |PUB |Order-2:8 | 13 31|Order |PUB |Order-3:9 | 13 32|Order |PUB |Order-5:11 | 13 33|Order |PUB |Order-6:12 | 13 34|Order |PUB |Order_2015:13 | 13 35|Order |PUB |Order_2019:14 | 13 36|Order |PUB |Order_2009:15 | 13 37|Order |PUB |Order_2005:16 | 13 38|tpInvoice |PUB |tpInvoice_2019:1 | 26 39|tpInvoice |PUB |tpInvoice_2009:2 | 26 40|tpInvoice |PUB |tpInvoice_1999:3 | 26 41|tpPurchaseOrder |PUB |tpPurchaseOrder-1:1 | 27 42|tpPurchaseOrder |PUB |tpPurchaseOrder-10:2 | 27 43|tpPurchaseOrder |PUB |tpPurchaseOrder-2:3 | 27 44|tpPurchaseOrder |PUB |tpPurchaseOrder-3:4 | 27 45|tpPurchaseOrder |PUB |tpPurchaseOrder-4:5 | 27 46|tpPurchaseOrder |PUB |tpPurchaseOrder-5:6 | 27 47|tpPurchaseOrder |PUB |tpPurchaseOrder-6:7 | 27 48|tpPurchaseOrder |PUB |tpPurchaseOrder-7:8 | 27 49|tpPurchaseOrder |PUB |tpPurchaseOrder-8:9 | 27 50|tpPurchaseOrder |PUB |tpPurchaseOrder-9:10 | 27 ---------------------------------------------------------------------------------------------------------------------- Page 2 of 2 Input Your Choice (c/C) - Change Display (a/A) - All (p/P) - Previous Page (q/Q) - Quit (g/G) - Go
- Выберите австралийскую секцию. Для этого введите 1 (Customer-1), нажмите Enter, и затем введите g и нажмите Enter (для продолжения). Откроется окно выбора индекса, в нашем случае список будет состоять из одного индекса:
1 Choose Table Partitions to Fix Indexes ---------------------------------------------------------------------------------------------------------------------- Option| Table Name | Table Owner | Partition Name : ID |Number ---------------------------------------------------------------------------------------------------------------------- * 1|Customer |PUB |Customer-1:1 | 4 2|Customer |PUB |Customer-2:2 | 4 3|Customer |PUB |Customer-3:3 | 4 4|Customer |PUB |Customer-4:4 | 4 5|Customer |PUB |Customer-5:5 | 4 6|Customer |PUB |Customer-6:6 | 4 7|Customer |PUB |Customer-7:7 | 4 8|Customer |PUB |Customer-8:8 | 4 9|Customer |PUB |Customer-9:9 | 4 10|Customer |PUB |Customer-10:10 | 4 11|Customer |PUB |Customer-11:11 | 4 12|Customer |PUB |Customer-12:12 | 4 13|Customer |PUB |Customer-13:13 | 4 14|Customer |PUB |Customer-14:14 | 4 15|Customer |PUB |Customer-15:15 | 4 16|Customer |PUB |Customer-16:16 | 4 17|Customer |PUB |Customer-17:17 | 4 18|Customer |PUB |Customer-18:18 | 4 19|Customer |PUB |Customer-19:19 | 4 20|Customer |PUB |Customer-20:20 | 4 21|Customer |PUB |Customer-21:21 | 4 22|Customer |PUB |Customer-22:22 | 4 23|Customer |PUB |Customer-23:23 | 4 24|Order |PUB |Order-12:1 | 13 25|Order |PUB |Order-11:2 | 13 ---------------------------------------------------------------------------------------------------------------------- Page 1 of 2 Input Your Choice (c/C) - Change Display (a/A) - All (n/N) - Next Page (q/Q) - Quit (g/G) - Go g Choose Indexes to Fix --------------------------------------------------------------------------------------------------------------------- Option| Table Name | Table Owner | Index Name |G/L|Number --------------------------------------------------------------------------------------------------------------------- 1|Customer |PUB |CountrySalesrepLocalIdx | L | 67 --------------------------------------------------------------------------------------------------------------------- Page 1 of 1 Input Your Choice (c/C) - Change Display (t/T) - All Active Indexes (i/I) - All Inactive Indexes (a/A) - All (q/Q) - Quit (g/G) - Go
- Выберите индекс CountrySalesrepLocalIdx. Для этого либо введите его номер, либо введите a (All) и нажмите Enter.
1 Choose Indexes to Fix --------------------------------------------------------------------------------------------------------------------- Option| Table Name | Table Owner | Index Name |G/L|Number --------------------------------------------------------------------------------------------------------------------- * 1|Customer |PUB |CountrySalesrepLocalIdx | L | 67 --------------------------------------------------------------------------------------------------------------------- Page 1 of 1 Input Your Choice (c/C) - Change Display (t/T) - All Active Indexes (i/I) - All Inactive Indexes (a/A) - All (q/Q) - Quit (g/G) - Go
- После выделения индекса (он отмечен звёздочкой в списке) введите g и нажмите Enter для продолжения. Подтвердите свои намерения, введя y и нажав Enter.
- На запросы «Validate recids for index entries» и «Fix indexes on Scan» ответьте y (yes).
- На вопрос «Provide a range of records to scan through» введите All и нажмите Enter.
- Подтвердите намерения и дождитесь завершения работы утилиты:
(c/C) - Change Display (t/T) - All Active Indexes (i/I) - All Inactive Indexes (a/A) - All (q/Q) - Quit (g/G) - Go g Is this correct? (y/n) y Validate recids for index entries. Is this correct? (y/n) y Fix indexes on Scan. Is this correct? (y/n) y Provide a range of records to scan through. Type All or the recid to start the scan at or Q to quit. All Is this correct? (y/n) y Index 67 (PUB.Customer, CountrySalesrepLocalIdx.Customer-1:1): 1 keys Scanning records 64 to 16320 in area 300 for missing keys: Phase 1, processing block number 128 in area 300. (8365) Record scan of 64 to 16320 in area 300 complete: 1 keys read, 1 total. Scanning records 32 to 6880 in area 301 for missing keys: Record scan of 32 to 6880 in area 301 complete: 0 keys read, 1 total. 1 indexes, 5 blocks, 1 keys checked. Index fix completed successfully. (4332) proenv>
Задание завершено!