Salesforce

An idxbuild SOME builds all indexes after a previous index rebuild has terminated or been cancelled

« Go Back

Information

 
TitleAn idxbuild SOME builds all indexes after a previous index rebuild has terminated or been cancelled
URL NameP70435
Article Number000142132
EnvironmentProduct: Progress
Version: 8.x, 9.x
Product: OpenEdge
Version: 10.0A
OS: All supported platforms
Question/Problem Description
An IDXBUILD SOME sometimes builds all indexes after a previous index rebuild has terminated or been cancelled
An index rebuild (idxbuild) with SOME builds all indexes after an index rebuild failure.
 
Steps to Reproduce
Clarifying Information
Error MessageIndex reconstruction utility was aborted. Rerun it to completion.(651)
Can't find selected index list file .xb; assuming ALL. (2786)
Defect NumberDefect OE00096944 / PSC00145740
Enhancement Number
Cause
The <dbname>.xb file may not exist in the working directory or the directory where the dbname.db file is located after a previous IDXBUILD command terminated.  It is deleted when the idxbuild session terminated due to the content of .srt file directories being inaccessible for example. When the <dbname>.xb file does not exist, all subsequent index builds will be considered as an index rebuild against all tables.
Resolution
Upgrade to OpenEdge 10.0B or later, where the .xb is not deleted after a failed index build.  This file is only created when the 'some', 'area', 'table or 'schema' IDXBUILD Menu Options are used for IDXBUILD. The .xb file is never created when the idxbuild 'all' option is used.

If the issue is occurring in a version of Progress or OpenEdge where you cannot upgrade use the workaround below.


 
Workaround
Before attempting any repair routine backup the database.  If an index rebuild does not complete, the database will be inaccessible by any means until the flag in the master block is cleared by a successful index build. Otherwise, the backup will need to be restored.

The IDXBUILD qualifier of the PROUTIL command, accomplishes most of its work without displaying messages, unless it encounters a fatal error condition.  

If an IDXBUILD is interrupted while rebuilding a selected subset of indexes, the list of selected indexes is usually retained in a file named <dbname>.xb. The <dbname>.xb file is used when the IDXBUILD utility is restarted, so that only the original subset listing of indexes are rebuilt in subsequent runs.

If the IDXBUILD utility is unable to locate the <dbname>.xb file, then it will assume ALL on the subsequent run and will deactivate all indexes for the database. Depending on the size of the database and the number of indices, the subsequent rebuild all indexes for a database instead of the original selected subset will take a lot longer than initially planned. 

It is encouraged that if a subset IDXBUILD terminates for any reason, before re-running the index build operation, ensure that the <dbname>.xb file exists in the current working directory where the IDXBUILD command is being issued.  If the .xb file does not exist, then a <dbname>.xb text file can be manually created. This file must contain an exact subset listing of all tables/indexes that were being rebuilt in the prior failure.  Failure to adhere to this recommendation will result in index corruption.  In most cases, IDXBUILD will finish without reporting errors, however, when the application makes use of these damaged indexes (that were missing in the .xb file), the consequences will be realized.

Manually creating the dbname.xb file:
  • The file needs to have <dbname>.xb for the file name. Example: sports2000.xb 
  • This <dbname>.xb file must exist in the working directory where the IDXBUILD command is going to be issued. When the IDXBUILD utility is run, it looks in the current directory for the <dbname.xb> file. 
  • The contents of the <dbname>.xb file has the following format which needs to be repeated for all tables and indexes associated with the failed IDXBUILD. 
tableowner
tablename
indexname
  • The file also needs to have an "!" exclamation mark for the final entry. 

Example sports2000.xb file:
PUB
customer
name
PUB
customer
custnum
PUB
order
custorder
PUB
order
orderdate
!
 
When the IDXBUILD utility is rerun, it will locate the <dbname>.xb file and display to the screen all tables and indexes which need to be rebuilt then prompt for approval prior to starting the IDXBUILD.  It will then ask for information regarding sort space and then proceed with the rebuild.

On successful completion of a subset index rebuild the <dbname>.xb file is deleted.
Notes
Keyword Phrase
Last Modified Date6/13/2016 8:38 AM

Powered by