Make sure you have set the necessary BRSPACE parameters in the initialization profile init<DBSID>.sap, because BRTOOLS uses these when it calls BRSPACE.
The database must be open.
You can use BR*Tools for Oracle to manage database statistics.
Start the procedure using BRGUI or BRTOOLS, or from the command line:
BRGUI or BRTOOLS:
Choose
.BRGUI or BRTOOLS displays the menu BRSPACE main options for managing database statistics, 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) |
|
Statistics action (action) |
|
Statistics export Id (expid) |
|
Tablespace names (tablespace) |
|
Table owner (owner) |
|
Table names (table) |
|
Confirmation mode (confirm) |
|
Extended output (output) |
|
Scrolling line count (scroll) |
|
Message language (language) |
|
BRSPACE command line (command) |
This shows you the BRSPACE -f mstats command that is to be executed using the current settings. |
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 mstats
You can enter more parameters, including the action, if required. For more information, see BRSPACE -f mstats.
Whichever way you start the procedure - with BRGUI or BRTOOLS, or from the command line - you can use quick mode if you know the object name, in this case the table name. 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.
BRSPACE displays the Manage database statistics main menu.
You can use quick mode as follows:
If you have already entered the action, continue with step 4.
If you have already entered the table name and action, continue with step 6.
If you have entered multiple table names, BRSPACE displays as confirmation a List of tables for manage statistics. You cannot make a selection from this list. If required, go back and make a new selection.
Continue with step 6 (quick mode).
Choose or confirm the required action:
Export table statistics
Import table statistics
Delete table statistics
Restore table statistics
Lock table statistics
Unlock table statistics
Delete statistics exports
Show statistics exports
Show statistics versions
If you have already entered the table name, continue with step 6 (quick mode).
BRSPACE displays the table or export list, depending on which action you chose:
For actions export, delete, restore, lock, or unlock table statistics:
List Entry |
Meaning |
---|---|
Pos. |
List sequence number |
Owner |
Table owner |
Table |
Table name |
Part. |
Partitioned status |
Vers. |
Number of statistics versions |
Lock |
Lock status |
Analyzed |
Date last analyzed by update statistics |
Rows |
Number of rows |
For actions import table statistics, delete statistic exports, or show statistics exports:
List Entry |
Meaning |
---|---|
Pos. |
List sequence number |
Run |
Export run |
Date |
Date of export |
Export Id. |
Export ID |
Owner |
Export owner |
Tables |
Number of tables |
BRSPACE only displays entries that can be processed by your chosen action.
Select a table or export or select multiple tables or exports.
These examples apply only to input in character mode.
To select the first three tables or exports in the list, enter 1-3.
To select the first and third tables or exports, enter 1,3.
To select the first three tables or exports and the fifth, enter 1-3,5.
To select all entries, enter 0.
For actions export, delete, restore, lock, and unlock, BRSPACE displays the menu Options for manage statistics of tables.
For actions export, delete, restore, lock, and unlock, set the required options:
Menu Entry |
Meaning |
---|---|
Last analyzed time stamp (analyzed) - display only |
Date and time of the last statistics analysis for the selected tables |
Number of statistics versions (stats_vers) - display only |
Number of statistics versions for the selected tables |
Current statistics lock status (stats_lock) - display only |
Current lock status for the selected tables |
Manage statistics action (action) |
The action that you selected above. |
Statistics export Id (expid) |
|
Time for restore statistics (time) |
To start processing with the selected options, choose Continue.
Check the results in the BRSPACE logs.
The summary log space<DBSID>.log displays the return code.
The detail log s<encoded timestamp>.mst displays the details.
The structure change log struc<DBSID>.log logs all structure changes.
For more information about how to view the logs with BR*Tools, see Showing Profiles and Logs with BR*Tools.