Show TOC

-f idrebuildLocate this document in the navigation structure

This BRSPACE function rebuilds indexes. For more information, see Rebuilding Indexes with BR*Tools.

Function options:

  • -a|-action: specifies the action for the index rebuild

    Syntax: -a|-action check|rebpart|rebuild|resume|stop|suspend

    • check checks indexes for rebuild

    • rebpart rebuilds index partitions

    • rebuild rebuilds indexes in the standard way

    • resume resumes the rebuild

      This option lets you resume the rebuild that was paused with the suspend option.

    • stop stops the rebuild

      This option enables a “clean” premature termination of the rebuild without all indexes being processed. However, this does not cancel the rebuild of individual indexes. Instead, the process is terminated before the next index is processed. Therefore this action can take a long time.

    • suspend suspends the rebuild

      This option lets you suspend the rebuild without terminating it. However, this does not cancel the rebuild of individual indexes. Instead, the process is terminated before the next index is processed. Therefore this action can take a long time.

    Default: rebuild

    Caution

    You start the stop, suspend, and resume actions in parallel to a current rebuild, usually from a different shell or command prompt, for example:

    brspace -c force -f tbrebuild -a suspend

    ...

    brspace -c force -f tbrebuild -a resume

  • -c|-compress: specifies the index compression action

    Syntax: -c|-compress cind|cind_only|dind|dind_only|none

    • cind compresses indexes

    • cind_only compresses only qualified indexes

    • dind decompresses indexes

    • dind_only decompresses only qualified indexes

    • none does nothing

    For more information, see SAP Note 1464156 Information published on SAP site.

    Default: none

  • -e|-degree specifies the parallel degree to be used internally by the ALTER INDEX REBUILD statement for the rebuild of individual indexes. It is reset to the old value by BRSPACE after the rebuild has finished.

    Syntax: -e|-degree <degree>

    Default: the parallel degree of the current index

  • -i|-index: specifies the indexes to be rebuilt

    Syntax: -i|-index all|allsel|[<owner>.]<index>|

    [<owner>.][<prefix>]%[<suffix>]|

    [<owner>.][<prefix>]*[<suffix>]|<index_list>|unusable

    where:

    all or “%” means preselect

    allsel or “*” means final select:

    unusable means rebuild unusable indexes

    For more information about wildcards for preselect and select, see Selecting Objects in Segment Management with BR*Tools.

    Default: all (preselection)

  • -ic|-indcompr: specifies the index compression method

    Syntax: -ic|-indcompr all_col|ora_proc|sap_proc|val_cmd|<number>

    • all_col: all eligible index columns

    • ora_proc: procedure provided by Oracle

    • sap_proc: procedure provided by SAP

    • val_cmd: result of validate command

    • <number>: fixed number of index columns

    For more information, see SAP Note 1464156 Information published on SAP site.

    Default: ora_proc

  • -ip|-indpart all|allsel|[[<owner>.]<index>.]<partition>|: specifies the index partitions to be rebuilt

    [[<owner>.]<index>.][<prefix>]%[<suffix>]|

    [[<owner>.]<index>.][<prefix>]*[<suffix>]|<indpart_list>

    all or allsel means selection of all index partitions

    '%' or '*' means selection of wildcards

    Default: all index partitions

  • -l|-initial: specifies the initial extent size of the reorganized index

    Syntax: -l|-initial <category>

    <category> specifies the size of the initial extent after reorganization and is restricted to the following possible values:

    • 1: 16 KB

    • 2: 64 KB

    • 3: 1 MB

    • 4: 8 MB

    • 5: 64 MB

    • 6: 1 GB

    • 7: 8 GB

    • 8: 64 GB

    Default: none

    If you do not specify initial at all, the reorganized index retains the initial extent size from before the reorganization.

  • -m|-mode: lets you rebuild the indexes offline - that is, without the ONLINE clause of the ALTER INDEX REBUILD statement (this locks the index).

    Syntax: -m|-mode online|offline

    This method can be faster than an online rebuild but it locks the indexes, so make sure that your SAP system is not running at rebuild time.

    Default: online

  • -n|-newts: specifies that the indexes are rebuilt to a new tablespace

    Syntax: -n|-newts <tablespace>

    <tablespace> specifies the name of the new tablespace

    Default: current tablespace that the indexes are located in

  • -o|-owner: defines the SAP owner of the tables - useful for Multiple Components in One Database (MCOD) configurations

    Syntax: -o|-owner <owner>|<owner_list>

    <owner> or <owner_list> specifies the name of the SAP owner or owners

    Default: all SAP owners in MCOD, otherwise the single SAP owner

  • -p|-parallel: specifies parallel processing for the rebuild

    Syntax: -p|-parallel <threads>

    <threads> specifies the number of processing threads running in parallel

    Default: 1, that is, no parallel processing

  • -s|-tablespace: specifies the tablespace of the indexes to be rebuilt

    Syntax: -s|-tablespace <tablespace>|<tablespace list>

    <tablespace> or <tablespace list> specifies the tablespace name(s)

    Default: none

  • -t|-table: specifies the table(s) of the indexes to be rebuilt

    Syntax: -t|-table all|allsel|[<owner>.]<table>|

    [<owner>.][<prefix>]%[<suffix>]|

    [<owner>.][<prefix>]*[<suffix>]|<table_list>

    where:

    all or “%” means preselect

    allsel or “*” means here also preselect

    For more information about wildcards for preselect and select, see Selecting Objects in Segment Management with BR*Tools.

    Default: none