Show TOC

Rebuilding Indexes with BR*ToolsLocate this document in the navigation structure

Context

You can use BR*Tools for Oracle to rebuild indexes.

You can use the following types of rebuild:

  • Rebuild indexes online or offline

  • Rebuild index partitions online or offline

  • Check indexes for rebuild

  • Stop rebuild (command-line mode only)

  • Suspend rebuild (command-line mode only)

  • Resume rebuild (command-line mode only)

For more information, see -f idrebuild.

Procedure

  1. Start the procedure using BRGUI or BRTOOLS, or from the command line:
    • BRGUI or BRTOOLS:

      1. Choose Start of the navigation path Segment Management Next navigation step Rebuild indexes End of the navigation path.

        BRGUI or BRTOOLS displays the menu BRSPACE options for rebuild of indexes, where you specify the options with which you call BRSPACE.

      2. Set the required options:

        Menu Entry

        Equivalent BRSPACE Command Option

        BRSPACE profile (profile)

        -p|-profile

        Database user/password (user)

        -u|-user

        Rebuild action (action)

        -f idrebuild -a|-action

        Tablespace names (tablespace)

        -f idrebuild -s|-tablespace

        Index owner (owner)

        -f idrebuild -o|-owner

        Table names (table)

        -f idrebuild -t|-table

        Index names (index)

        -f idrebuild -i|-index

        Index partitions (indpart)

        -f idrebuild -ip|-indpart

        Confirmation mode (confirm)

        -c|-confirm

        Extended output (output)

        -o|-output

        Scrolling line count (scroll)

        -s|-scroll

        Message language (language)

        -l|-language

        BRSPACE command line (command)

        This shows you the BRSPACE -f idrebuild command that is to be executed using the current settings.

        Note

        If required, you can enter the names of multiple objects in Index names or Table names. You can also use wildcards. For more information, see Selecting Objects in Segment Management with BR*Tools.

        However, you can only finally select indexes by entering a wildcard with “*” or “[<prefix>]*[<suffix>]” in Index names. If you enter “*” or “[<prefix>]*[<suffix>]” in Table names, it is treated as a preselection, not a final selection.

        You can also specify a list of indexes to be processed with rebuild_index in the initialization profile init<DBSID>.sap.

        You can also specify a list of index partitions to be processed with rebuild_indpart in the initialization profile init<DBSID>.sap.

        In Tablespace names and Index owner, you can specify multiple objects but you cannot use wildcards.

        BRSPACE processes all the indexes in the specified tablespace name(s), or all indexes belonging to the specified index owner(s) or tables. But these entries and rebuild action entry are optional.

      3. Choose Continue.

        BRGUI or BRTOOLS prompts you to start BRSPACE.

      4. Choose Continue to start BRSPACE.

    • Command line:

      Enter at least the following command:

      brspace -f idrebuild

      You can enter more parameters, including the indexes names, if required. For more information, see BRSPACE -f idrebuild .

      Note

      Whichever way you start the procedure - with BRGUI or BRTOOLS, or from the command line - you can use quick mode if you know the final object names, in this case the index names. For more information, see How to Use BR*Tools.

    BRSPACE starts and you see a message that includes Start of BRSPACE processing. From now on, BRSPACE writes a detail log.

  2. If you have already entered the index names, continue with step 5 (quick mode).
    Note

    If you have entered multiple indexes, BRSPACE displays as confirmation a List of indexes for rebuild. If you have not already made a final selection, you can make a selection from this list.

    Continue with step 5 (quick mode).

    BRSPACE displays the Rebuild indexes main menu.

  3. Choose Rebuild indexes.

    BRSPACE displays the index list:

    List Entry

    Meaning

    Pos.

    List sequence number

    Owner

    Index owner

    Table

    Table name

    Index

    Index name

    Pt.

    Partitioned

    Dg.

    Parallel degree

    Tablespace

    Tablespace name

  4. Select an index or multiple indexes.
    Example

    These examples only apply to input in character mode.

    To select the first three indexes in the list, enter 1-3.

    To select the first and third indexes, enter 1,3.

    To select the first three indexes and the fifth, enter 1-3,5.

    To select all indexes, enter 0.

    BRSPACE displays the menu Options for rebuild of indexes.

  5. Set the required options:

    Menu Entry

    Meaning

    Rebuild action (action)

    -f idrebuild -a|-actionj

    Rebuild mode (mode)

    -f idrebuild -m|-mode

    New destination tablespace (newts)

    -f idrebuild -n|-newts.

    Parallel threads (parallel)

    -f idrebuild -i|-indts

    Index parallel degree (degree)

    -f idrebuild -e|-degree

    Category of initial extent size (initial)

    -f idrebuild -l|-initial

    Compression action (compress)

    -f idrebuild -c|-compress

    Index compression method (indcompr)

    -f idrebuild -ic|-indcompr

    SQL command (command)

    This shows you the SQL command that is to be executed using the current settings.

  6. To start processing with the selected options, choose Continue.

Results

Check the results in the BRSPACE logs:

  • The summary log space<DBSID>.log displays the return code.

  • The detail log s<encoded timestamp>.idr displays the details.

For more information on how to view the logs with BR*Tools, see Showing Profiles and Logs with BR*Tools.

Next Steps

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