Consultor Eletrônico



Kbase P109985: How to generate the list of indexes to check after proutil -C mvsch
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/16/2008
Status: Unverified

GOAL:

How to generate the list of indexes to check after proutil -C mvsch

GOAL:

How to generate the list of indexes to check after performing a schema move

FACT(s) (Environment):

Progress 9.1D
Progress 9.1E
OpenEdge 10.x

FIX:


After performing a schema move, a check of the schema indexes should be performed. The following 4GL program generates the list of indexes to be fed to the idxcheck utility.
To do so, start up a 4GL client session against the database *before* the schema move, and run the following piece of 4GL code:

DEFINE VARIABLE cTables AS CHARACTER NO-UNDO
EXTENT 9
INITIAL ["_Db", "_File", "_Field",
"_Index", "_Index-Field",
"_File-Trig", "_Field-Trig",
"_Sequence", "_StorageObject"].

DEFINE VARIABLE iCount AS INTEGER NO-UNDO.

OUTPUT TO "idxcheck.txt".
PUT "S" SKIP. /* S = Some. */
DO iCount = 1 TO EXTENT(cTables):
FIND _File WHERE _File._File-name = cTables[iCount] NO-LOCK.
FOR EACH _Index OF _File:
PUT UNFORMATTED
_File._File-name SKIP
_Index._Index-name SKIP.
END.
END.
PUT "!" SKIP. /* End of index list. */
PUT "y" SKIP. /* Is this correct (y
)? */
OUTPUT CLOSE.

After idxcheck.txt has been created, execute the schema move:

proutil <dbname> -C mvsch

Once the schema move has completed run:

proutil <dbname> -C idxcheck < idxcheck.txt > idxcheck.out

Please note that, because all indexes llisted reside in the Schema Area, idxcheck will only check that area; this makes idxcheck quick even on massive databases.
As soon as this is finished, idxcheck.out should be checked for any sign of index corruption.