Gathers and displays statistics on how the database uses storage, logical area, or page space.
1 – Description
The RMU Analyze command provides a maintenance tool for database administrators. It generates a formatted display of statistical information that describes storage utilization in the database. Information is displayed selectively for storage areas and logical areas, or for a range of pages in a storage area. You can use the RMU Analyze command to analyze the following: o Space utilization for database pages o Space utilization for storage areas o Space utilization for logical areas
2 – Format
(B)0[mRMU/Analyze root-file-spec [4mCommand[m [4mQualifiers[m x [4mDefaults[m x /Areas[=storage-area-list] x /Areas /[No]Binary_Output=file-option-list x /Nobinary_Output /End=integer x /End=last-page /Exclude=(options) x No logical areas excluded /[No]Lareas[=logical-area-list] x /Lareas /Option = {Normal | Full | Debug} x /Option=Normal /Output=file-name x /Output=SYS$OUTPUT /Start = integer x /Start=first-page
3 – Parameters
3.1 – root-file-spec
The file specification for the database root file to be analyzed. The default file extension is .rdb.
4 – Command Qualifiers
4.1 – Areas
Areas[=storage-area-list] Areas=* Specifies the storage areas to be analyzed. You can specify each storage area by name or by the area's ID number. The default, the Areas qualifier, results in analysis of all storage areas. You can also specify the Areas=* qualifier to analyze all storage areas. If you specify more than one storage area, separate the storage area names or ID numbers in the storage-area-list parameter with a comma and enclose the list in parentheses. If you omit the Areas qualifier, information for all the storage areas is displayed. You can use the Start and End qualifiers with the Areas qualifier to analyze specific pages. If you use the Start and End qualifiers when you specify more than one storage area in the storage-area-list parameter, the same specified range of pages are analyzed in each specified storage area. The Areas qualifier can be used with an indirect command file. See the Indirect-Command-Files help entry for more information.
4.2 – Binary Output
Binary_Output=file-option-list Nobinary_Output Allows you to direct the summary results to a binary file, and to create a record definition file that is compatible with the data dictionary for the binary output file. The binary output file can be loaded into an Oracle Rdb database by using the RMU Load command with the Record_Definition qualifier for use by a user-written management application or procedure. The binary output can also be used directly by the user-written application or procedure. The valid file options are: o File=file-spec The File option causes the Analyze command data to be stored in an RMS file that contains a fixed-length binary record for each storage area and logical area analyzed. The default file extension for the binary output file is .unl. The following command creates the binary output file analyze_out.unl: $ RMU/ANALYZE/BINARY_OUTPUT=FILE=ANALYZE_OUT MF_PERSONNEL.RDB o Record_Definition=file-spec The Record_Definition option causes the Analyze command data record definition to be stored in an RMS file. The output file contains the definition in a subset of the data dictionary command format, a format very similar to RDO field and relation definitions. The default file extension for the record definition output file is .rrd. The following command creates the output file analyze_out.rrd: $ RMU/ANALYZE/BINARY_OUTPUT=RECORD_DEFINITION=ANALYZE_OUT - _$ MF_PERSONNEL.RDB You can specify both file options in one command by separating them with a comma and enclosing them within parentheses, for example: $ RMU/ANALYZE/BINARY_OUTPUT= - _$ (FILE=ANALYZE_OUT,RECORD_DEFINITION=ANALYZE_OUT) - _$ MF_PERSONNEL.RDB If you specify the Binary_Output qualifier, you must specify at least one of the options. The default is the Nobinary_Output qualifier, which does not create an output file.
4.3 – End
End=integer Specifies the ending page number for the analysis. The default is the end of the storage area file.
4.4 – Exclude
Exclude=System_Records Exclude=Metadata Exclude=(System_Records, Metadata) Excludes information from the RMU Analyze command output. You can specify Exclude=System_Records or Exclude=Metadata, or both. If you specify both options, enclose them within parentheses and separate each option with a comma. When you do not specify the Exclude qualifier, data is provided for all the logical areas in the database. The options are as follows: o System_Records Information on the RDB$SYSTEM_RECORDS logical areas is excluded from the Analyze command output. o Metadata Information on all the Oracle Rdb logical areas (for example, the RDB$SYSTEM_RECORDS and RDB$COLLATIONS_NDX logical areas) is excluded from the RMU Analyze command output. Data is accumulated for the logical areas excluded with the Exclude qualifier, but the data is excluded from the Analyze output. You cannot use the Exclude qualifier and the Lareas qualifier in the same RMU Analyze command.
4.5 – Lareas
Lareas[=logical-area-list] Lareas=* Nolareas Specifies the logical areas to be analyzed. Each table in the database is associated with a logical area name. The default, the Lareas qualifier, results in analysis of all logical areas. You can also specify the Lareas=* qualifier to analyze all logical areas. If you specify more than one logical area name, separate the logical area names in the logical-area-list with a comma and enclose the list in parentheses. The Lareas qualifier can be used with indirect command files. See the Indirect-Command-Files help entry for more information.
4.6 – Option
Option=Normal Option=Full Option=Debug Specifies the type of information and level of detail the analysis will include. Three types of output are available: o Normal Output includes only summary information. The Normal option is the default. o Full Output includes histograms and summary information. o Debug Output includes internal information about the data, as well as histograms and summary information. In general, use the Debug option for diagnostic support purposes. You can also use the Debug option to extract data and perform an independent analysis.
4.7 – Output
Output=file-name Specifies the name of the file where output will be sent. The default file extension is .lis. If you do not specify the Output qualifier, the output is sent to SYS$OUTPUT.
4.8 – Start
Start=integer Specifies the starting page number for the analysis. The default is 1.
5 – Usage Notes
o To use the RMU Analyze command for a database, you must have the RMU$ANALYZE privilege in the root file ACL for the database or the OpenVMS SYSPRV or BYPASS privilege. o When the RMU Analyze command is issued for a closed database, the command executes without other users being able to attach to the database. o Detected asynchronous prefetch should be enabled to achieve the best performance of this command. Beginning with Oracle Rdb V7.0, by default, detected asynchronous prefetch is enabled. You can determine the setting for your database by issuing the RMU Dump command with the Header qualifier. If detected asynchronous prefetch is disabled, and you do not want to enable it for the database, you can enable it for your Oracle RMU operations by defining the following logicals at the process level: $ DEFINE RDM$BIND_DAPF_ENABLED 1 $ DEFINE RDM$BIND_DAPF_DEPTH_BUF_CNT P1 P1 is a value between 10 and 20 percent of the user buffer count. o The following RMU Analyze command directs the results into a record definition file called db.rrd. This file is compatible with the syntax for creating new columns and tables in the data dictionary. $ RMU/ANALYZE/BINARY_OUTPUT=RECORD_DEFINITION=DB.RRD MF_PERSONNEL $! Display the db.rrd file created by the previous command: $ TYPE DB.RRD DEFINE FIELD RMU$DATE DATATYPE IS DATE. DEFINE FIELD RMU$AREA_NAME DATATYPE IS TEXT SIZE IS 32. DEFINE FIELD RMU$STORAGE_AREA_ID DATATYPE IS SIGNED WORD. DEFINE FIELD RMU$FLAGS DATATYPE IS SIGNED WORD. DEFINE FIELD RMU$TOTAL_BYTES DATATYPE IS F_FLOATING. DEFINE FIELD RMU$EXPANDED_BYTES DATATYPE IS F_FLOATING. DEFINE FIELD RMU$FRAGMENTED_BYTES DATATYPE IS F_FLOATING. DEFINE FIELD RMU$EXPANDED_FRAGMENT_BYTES DATATYPE IS F_FLOATING. DEFINE FIELD RMU$TOTAL_COUNT DATATYPE IS F_FLOATING. DEFINE FIELD RMU$FRAGMENTED_COUNT DATATYPE IS F_FLOATING. DEFINE FIELD RMU$FRAGMENT_COUNT DATATYPE IS F_FLOATING. DEFINE FIELD RMU$PAGE_LENGTH DATATYPE IS SIGNED WORD. DEFINE FIELD RMU$MAX_PAGE_NUMBER DATATYPE IS SIGNED LONGWORD. DEFINE FIELD RMU$FREE_BYTES DATATYPE IS F_FLOATING. DEFINE FIELD RMU$OVERHEAD_BYTES DATATYPE IS F_FLOATING. DEFINE FIELD RMU$AIP_COUNT DATATYPE IS F_FLOATING. DEFINE FIELD RMU$ABM_COUNT DATATYPE IS F_FLOATING. DEFINE FIELD RMU$SPAM_COUNT DATATYPE IS F_FLOATING. DEFINE FIELD RMU$INDEX_COUNT DATATYPE IS F_FLOATING. DEFINE FIELD RMU$BTREE_NODE_BYTES DATATYPE IS F_FLOATING. DEFINE FIELD RMU$HASH_BYTES DATATYPE IS F_FLOATING. DEFINE FIELD RMU$DUPLICATES_BYTES DATATYPE IS F_FLOATING. DEFINE FIELD RMU$OVERFLOW_BYTES DATATYPE IS F_FLOATING. DEFINE FIELD RMU$LOGICAL_AREA_ID DATATYPE IS SIGNED WORD. DEFINE FIELD RMU$RELATION_ID DATATYPE IS SIGNED WORD. DEFINE FIELD RMU$RECORD_ALLOCATION_SIZE DATATYPE IS SIGNED WORD. DEFINE FIELD RMU$TOTAL_SPACE DATATYPE IS F_FLOATING. DEFINE RECORD RMU$ANALYZE_AREA. . . . o The following list describes each of the fields in the db.rrd record definition: - RMU$DATE Contains the date that the Analyze operation was done - RMU$AREA_NAME Contains the name of the storage area that was analyzed - RMU$STORAGE_AREA_ID Contains the area ID of the storage area that was analyzed - RMU$FLAGS The three possible values in this field have the following meanings: * 0-Indicates that the record is a storage area record, not a logical area record * 1-Indicates that data compression is not enabled for the logical area * 3-Indicates that data compression is enabled for the logical area - RMU$TOTAL_BYTES Contains the total size of the data stored in the logical area - RMU$EXPANDED_BYTES Contains the total size of the stored data in the logical area after decompression - RMU$FRAGMENTED_BYTES Contains the number of bytes in the stored fragments - RMU$EXPANDED_FRAGMENT_BYTES Contains the number of bytes in the stored fragments after decompression - RMU$TOTAL_COUNT Contains the total number of records stored - RMU$FRAGMENTED_COUNT - Contains the number of fragmented records - RMU$FRAGMENT_COUNT Contains the number of stored fragments - RMU$PAGE_LENGTH Contains the length in bytes of a database page in the storage area - RMU$MAX_PAGE_NUMBER Contains the page number of the last initialized page in the storage area - RMU$FREE_BYTES Contains the number of free bytes in the storage area - RMU$OVERHEAD_BYTES Contains the number of bytes used for overhead in the storage area - RMU$AIP_COUNT Contains the number of the area inventory pages (AIPs) in the storage area - RMU$ABM_COUNT Contains the number of area bit map (ABM) pages in the storage area - RMU$SPAM_COUNT Contains the number of space area management (SPAM) pages in the storage area - RMU$INDEX_COUNT Contains the number of index records in the storage area - RMU$BTREE_NODE_BYTES Contains the number of bytes for sorted indexes in the storage area - RMU$HASH_BYTES Contains the number of bytes for hashed indexes in the storage area - RMU$DUPLICATES_BYTES Contains the number of bytes for duplicate key values for sorted indexes in the storage area - RMU$OVERFLOW_BYTES Contains the number of bytes for hash bucket overflow records in the storage area - RMU$LOGICAL_AREA_ID Contains the logical area ID of the logical area that was analyzed - RMU$RELATION_ID Contains the record type of the row in the logical area that was analyzed - RMU$RECORD_ALLOCATION_SIZE Contains the size of a row when the table was initially defined - RMU$TOTAL_SPACE Contains the number of bytes available for storing user data in the logical area (used space + free space + overhead)
6 – Examples
Example 1 The following command analyzes the EMPIDS_LOW and EMP_INFO storage areas in the mf_personnel database: $ RMU/ANALYZE/AREAS=(EMPIDS_LOW,EMP_INFO)/OUTPUT=EMP.OUT - _$ MF_PERSONNEL.RDB Example 2 Both of the following commands analyze the DEPARTMENTS and SALARY_HISTORY storage areas in the mf_personnel database: $! Using storage area names to specify storage areas $ RMU/ANALYZE/AREAS=(DEPARTMENTS,SALARY_HISTORY) MF_PERSONNEL.RDB - $ /OUTPUT=DEP_SAL.OUT $! $! Using storage area ID numbers to specify storage areas $ RMU/ANALYZE/AREAS=(2,9) MF_PERSONNEL.RDB /OUTPUT=DEP_SAL.OUT