Removing Indexes Manually in OpenInsight 3.7 (General)
Created at 27 APR 2000 04:58PM
Introduction: This document will guide a user through the following index processes:
Removing Indexes Manually
Updating the Volume Directory
Indexing Table
Updating the Dictionary
Btree Indexes
Cross Reference Indexes
Relational Indexes
Final Steps in OpenInsight
When to Remove an Index Manually
This may be required when corruption or data loss occurs to the index portion of your data file (!file). If this error occurs, ensure that you have a Revelation NLM or Revelation NT Service installed and running on your system.
The first step to remove indexes manually, involves the following:
1. Log into your SYSPROG application.
2. From the System Editor s command line, Run ATTACH_TABLE path','REVMEDIA from the exec line of the system editor. (Where path is the DOS path to the OpenInsight directory that contains your OpenInsight data.) Example of default path: c:\revsoft\openinsight\datavol
3. Select File-Open Record from the main menu
4. Enter REVMEDIA for the Table name
5. Enter TABLE*APPLICATION for the Row
6. Remove the SI.MFS in the second field of the record
7. Save the record
8. Exit the record
You may now begin the process of removing indexes manually, as follows:
How to Remove the Index Manually | |
1. | Log into your application that contains the table that you are removing the index. |
2. | Open the SystemEditor. |
3. | Delete the indexed table. This can be done by typing at the exec: line, run delete_table !TABLENAME (where TABLENAME is the table that has the index applied to it). |
Updating the Dictionary
The indexing system provides a variety of information in the dictionary record of an indexed field. Depending on the type of indexing, different information is maintained. You will have to edit the dictionary record of every field in the table that was indexed.
How to Update the Dictionary | |
1. | Select File-Open Record from the main menu. |
2. | Open the appropriate dictionary TABLE and ROW. |
Btree Indexes
Field 6 of the dictionary record tells the system whether or not this field has a Btree index. If there is a 1 in this field, the field has had a Btree index applied. Change this 1 to a 0 and save the record.
Cross Reference Indexes
When a Cross Reference index is placed on a field, a symbolic field is created to maintain the index. This field can be identified by the XREFextension. Because this is no longer required, it should be deleted. This can be done by entering the System Editor and at the exec: line typing rundelete_row DICT.TABLENAME , FIELD_XREF . In addition, a field with a Cross Reference index has the name of the Cross Reference symbolic field in field 22 of the dictionary record.
Relational Indexes
Relational indexes use several fields in the dictionary record to store their control information.
How to Delete a Relational Index | |
1. | In the record that serves as the target of the relational index, change the 1 on line 25, which tells the system that this field's data is protected, to a 0. |
2. | Line 24 contains the name of the relational index; this should be deleted. |
3. | To completely remove the relational index, the dictionary of the source file must also be edited. In that dictionary, the source field will have the name of the related field on line 23. Delete this line. |
4. | Save the records and exit. |
Final Steps in OpenInsight
There are two other records in the dictionary that should be deleted, %PROTECT.SPEC% and %FIELDS%.
From the System Editor EXEC line, run the following two lines:
Run DELETE_ROW 'DICT.TABLENAME','%PROTECT.SPEC%'
Run DELETE_ROW 'DICT.TABLENAME','%FIELDS%'
After deleting these records, reattach the file and the system will recreate these records, reflecting the changes made to the dictionary.
At this point the file has had all indexes removed. Indexes can be re-established as necessary.