Rebuilding a Data Source: The REBUILD Command

In this section:

How to:

Reference:

You can make a structural change to a FOCUS data source after it has been created using the REBUILD command. Using REBUILD and one of its subcommands REBUILD, REORG, INDEX, EXTERNAL INDEX, CHECK, TIMESTAMP, DATE NEW, and MDINDEX, you can:

You can use the REBUILD facility:

Before using the REBUILD facility, you should be aware of several required and recommended prerequisites regarding file allocation, security authorization, and backup.


Top of page

x
Reference: Before You Use REBUILD: Prerequisites

Before you use the REBUILD facility, there are several prerequisites that you must consider:


Top of page

x
Procedure: How to Use the REBUILD Facility

The following steps describe how to use the REBUILD facility:

  1. Initiate the REBUILD facility by entering:
    REBUILD
  2. Select a subcommand by supplying its name or its number. The following list shows the subcommand names and their corresponding numbers:
    1. REBUILD        (Optimize the database structure)
    2. REORG          (Alter the database structure)
    3. INDEX          (Build/modify the database index)
    4. EXTERNAL INDEX (Build/modify an external index database)
    5. CHECK          (Check the database structure)
    6. TIMESTAMP      (Change the database timestamp)
    7. DATE NEW       (Convert old date formats to smart date formats)
    8. MDINDEX        (Build/modify a multidimensional index)

Your subsequent responses depend on the subcommand you select. Generally, you will only need to give the name of the data source and possibly one or two other items of information.


Top of page

x
Controlling the Frequency of REBUILD Messages

How to:

When REBUILD processes a data source, it displays status messages periodically (for example, REFERENCE..AT SEGMENT 1000) to inform you of the progress of the rebuild. The default display interval is every 1000 segment instances processed during REBUILD retrieval and load phases. The number of messages that appear is determined by the number of segment instances in the FOCUS data source being rebuilt, divided by the display interval.



x
Syntax: How to Control the Frequency of REBUILD Messages

REBUILD displays a message (REFERENCE..AT SEGMENT segnum) at periodic intervals to inform you of its progress as it processes a data source. You can control the frequency with which REBUILD displays this message by issuing the command

SET REBUILDMSG = {n|1000}

where:

n

Is any integer from 1,000 to 99,999,999 or 0 (to disable the messages).

A setting of less than 1000:



Example: Controlling the Display of REBUILD Messages

The following messages are generated for a REBUILD CHECK where REBUILDMSG has been set to 4000, and the data source contains 19,753 records.

STARTING..
REFERENCE..AT SEGMENT    4000
REFERENCE..AT SEGMENT    8000
REFERENCE..AT SEGMENT   12000
REFERENCE..AT SEGMENT   16000
NUMBER OF SEGMENTS RETRIEVED=   19753
CHECK COMPLETED...

WebFOCUS