Consultor Eletrônico



Kbase P23770: How to add an inactive Index to a database when AI is enabled.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   7/13/2006
Status: Unverified

GOAL:

How to add an inactive Index to a database when AI is enabled.

FIX:

To add an index with AI files enabled can be done but there are some things to consider.

Items to consider:

1. Idxfix is slower than Idxbuild (Idxbuild must be done off line and without ai enabled)

2. Idxfix could make the database log file grow substantially large.

3. AI file can also grow very large.

The Process is:

(1). While database is running with AI enabled add an inactive index to the table and then run idxfix.
(to run idxfix)
proutil dbname -C idxfix
(chose option 1, this will create index keys for each record)
1. Scan records for missing index entries.
(chose "some" to select the index just added)
Some
(Enter the name of table containing the index.)
Table name:
<table-name>
(enter the name of the index that was added)
Index name:
<index-name >
(Enter ! to indicate input is complete. (9176))
!
(Fix index on scan.)
y
(Provide range...)
all
(Is this correct?)
y

(2). When this has completed the index keys have been created for the new index but the index is still disabled
(3). To enable the index, shutdown the database and run idxfix again with the database offline but select option 3 to scan index keys and records.
(to run idxfix)
proutil dbname -C idxfix
(chose option 3. Both 1 and 2 above.., this will create index keys for each record)
3
(chose "some" to select the index just added)
Some
(Enter the name of table containing the index.)
Table name:
<table-name>
(enter the name of the index that was added)
Index name:
<index-name >
(Enter ! to indicate input is complete. (9176))
!
(**** The following indexes will be fixed:)
(is this correct?)
Y
(Validate recids for index entries.)
(is this correct?)
Y
(Fix indexes on Scan)
(is this correct?)
Y
(Provide Range...)
all
(is this correct?)
Y
(4). At the end of the execution of idxfix the index will be enabled and ready to use on the production database
(5). To activate the index on the hot swap just roll forward the AI notes from the production database.


The concerns here are that when the idxfix is run a log entry and an AI note entry are made for each record in the table. This could cause these files to grow substantially large if there are a large number of records in the table.

However, this method would allow the adding of an index to a database with AI enabled and the index could be added to the hot spare using the ai files.