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.
BRGUI or BRTOOLS:
Choose Segment Management Rebuild indexes .
BRGUI or BRTOOLS displays the menu BRSPACE options for rebuild of indexes, where you specify the options with which you call BRSPACE.
Set the required options:
Menu Entry |
Equivalent BRSPACE Command Option |
---|---|
BRSPACE profile (profile) |
|
Database user/password (user) |
|
Rebuild action (action) |
|
Tablespace names (tablespace) |
|
Index owner (owner) |
|
Table names (table) |
|
Index names (index) |
|
Index partitions (indpart) |
|
Confirmation mode (confirm) |
|
Extended output (output) |
|
Scrolling line count (scroll) |
|
Message language (language) |
|
BRSPACE command line (command) |
This shows you the BRSPACE -f idrebuild command that is to be executed using the current settings. |
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.
Choose Continue.
BRGUI or BRTOOLS prompts you to start BRSPACE.
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 .
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.
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.
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 |
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.
Menu Entry |
Meaning |
---|---|
Rebuild action (action) |
|
Rebuild mode (mode) |
|
New destination tablespace (newts) |
|
Parallel threads (parallel) |
|
Index parallel degree (degree) |
|
Category of initial extent size (initial) |
|
Compression action (compress) |
|
Index compression method (indcompr) |
|
SQL command (command) |
This shows you the SQL command that is to be executed using the current settings. |
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.
For more information about index compression, see SAP Note 1464156 .