HELPLIB.HLB  —  RMU72  Repair
    Corrects several types of database problems. You can use the RMU
    Repair command to:

    o  Repair all types of space area management (SPAM) page
       corruptions by reconstructing the SPAM pages in one or more
       storage areas.

    o  Repair all area bit map (ABM) page format errors.

    o  Repair all page tail errors to the satisfaction of the RMU
       Verify operation by making sure that every database page is
       in a logical area and contains the appropriate information for
       that logical area.

    o  Correct some performance problems that might otherwise have to
       be corrected by exporting and importing the database.

    o  Set damaged or missing segmented string (LIST OF BYTE VARYING)
       areas that are stored in write-once areas to null.

    The repair operation cannot correct corrupted user data, or
    corrupted indexes; use other commands such as the RMU Restore,
    the RMU Recover, the SQL IMPORT, or the RMU Load command and
    delete the affected structures to correct these problems.

                                   NOTE

       Use of the Abm or the Initialize=Tsns qualifier disables
       after-image journaling. After issuing an RMU Repair command
       with these qualifiers, back up the database and reenable
       journaling manually.

1  –  Description

    Because RMU Repair cannot correct every type of corruption, or
    guarantee improved performance, Oracle Corporation recommends
    that you do not use the RMU Repair command unless you have a
    backup copy or exported copy of your database. You can return
    to this backup copy of the database if your repair efforts are
    ineffective.

    The RMU Repair command operates off line and not in the context
    of a transaction, so no records are written to the database's
    .aij file by RMU Repair, and the repaired database cannot be
    rolled forward with the RMU Recover command. Oracle Corporation
    recommends that you make a backup copy of the database after
    using the RMU Repair command; the repair operation issues a
    message to this effect. Oracle RMU also issues a warning when
    you use this command on a database with after-image journaling
    enabled.

2  –  Format

  (B)0
     Command Qualifiers                  x Defaults
                                         x
     /[No]Abm                            x /Noabm
     /[No]All_Segments                   x All segments
     /Areas [={storage-area-list or *}]  x See description
     /Checksum                           x See description
     /[No]Initialize=initialize-options  x /Noinitialize
     /[No]Spams                          x See description
     /Tables [=table-list]               x All nonsystem tables
     /Worm_Segments                      x None

3  –  Parameters

3.1  –  root-file-spec

    A file specification for the database root file for which you
    want to repair corruption or improve performance.

4  –  Command Qualifiers

4.1  –  Abm

    Abm
    Noabm

    Causes the reconstruction of the logical area bit map (ABM)
    pages for areas specified with the Areas qualifier. After-image
    journaling is disabled when you specify the Abm qualifier. You
    must explicitly enable after-image journaling after the RMU
    Repair command completes if you want journaling enabled.

    The NoAbm qualifier specifies that ABM pages are not to be
    reconstructed; this is the default.

4.2  –  All Segments

    All_Segments
    Noall_Segments

    The All_Segments qualifier specifies that RMU Repair should
    retrieve all segments of a segmented string; the Noall_Segments
    qualifier specifies that RMU Repair should only retrieve the
    first segment of a segmented string.

    Specify the Noall_Segments qualifier if you know that the list
    storage map for any segmented strings stored on the specified
    areas might have contained multiple areas. For example, if the
    storage map was created using the following SQL command, Oracle
    Rdb would store all the segmented strings on AREA1 until AREA1
    became full. If AREA1 became full, Oracle Rdb would continue to
    write the rest of the segments into AREA2. Suppose AREA2 becomes
    corrupt. In this case, retrieving the first segment from AREA1
    is not sufficient; all segments must be retrieved to determine if
    part of the segmented string is missing.

    CREATE STORAGE MAP FOR LIST STORE IN (AREA1, AREA2) FOR (TABLE1)
       IN RDB$SYSTEM;

    Specifying the Areas qualifier and the All_Segments qualifier
    is unnecessary and redundant because specifying the All_Segments
    qualifier causes RMU Repair to check all storage areas regardless
    of where the segmented string was stored initially.

4.3  –  Areas

    Areas[={storage-area-list or *}]

    Specifies the storage areas in the database you want to repair.
    You can specify storage areas by name or by the area's ID number.

    By default, all the storage areas in the database are repaired.
    If you specify more than one storage area, separate the storage
    area names or ID numbers in the storage-area-list with a comma,
    and enclose the list within parentheses.

4.4  –  Checksum

    Checksum

    Reads every page in the database storage areas to verify that the
    checksum on each page is correct. If the checksum on the page is
    incorrect, it is replaced with the correct checksum.

    Use the Areas qualifier to specify which storage areas RMU
    Repair should check. If you do not specify the Areas qualifier,
    all pages in all storage areas are checked and updated (if
    incorrect).

    This qualifier can be used whether or not users are attached to
    the database.

    This qualifier is not valid for use with any other qualifiers
    except the Areas qualifier.

4.5  –  Initialize

    Initialize=initialize-options
    Noinitialize

    Allows you to specify initialization options. If more than one
    option is specified, separate the options with a comma, and
    enclose the list of options within parentheses.

    The following options are available for the Initialize qualifier:

    o  Free_Pages

       The Initialize=Free_Pages qualifier initializes database pages
       that do not contain data in the selected storage areas (that
       have a uniform page format). You can use the Initialize=Free_
       Pages qualifier to correct BADPTLARE errors found by the
       RMU Verify command and also to free pages from a table
       that has many deleted rows. If you specify the default, the
       Noinitialize qualifier, no database pages are initialized.

       Frequently, you will receive one or more RMU-W-ABMBITTERR
       error messages after you issue the RMU Repair command with
       the Initialize=Free_Pages qualifier. This occurs because the
       initialization of pages can create new ABM errors. Correct
       these errors by issuing the RMU Repair command with the
       Abm qualifier. (However, note that you cannot specify the
       Initialize=Free_Pages qualifier and the Abm qualifier on the
       same command line.) If you ignore the RMU-W-ABMBITTERR error
       messages, extra I/O operations will be performed (one for each
       RMU-W-ABMBITTERR error you received) when a database query
       causes a sequential scan of an entire table.

       If a table residing in a storage area that has a uniform
       page format is frequently accessed sequentially, the cost
       of the sequential access is determined by the number of
       allocated pages. If the maximum size allocated for the table
       is much larger than the table's average size, the cost of the
       sequential access can be excessive. By using the RMU Repair
       command with the Initialize=Free_Pages qualifier, you can
       purge the allocated but unused database pages from the table.
       In some cases, there may be a decrease in performance when
       you insert new data into the table after using this option.
       As with all Repair options, you should test the performance
       of the database after executing the command and be prepared to
       restore the backup made before executing the Repair command if
       you find that the command results in decreased performance.

       The initialization of free pages requires access to the Oracle
       Rdb system tables. You should not initialize free pages until
       you know that the RDB$SYSTEM storage area (where the system
       tables are stored) is not corrupted.

    o  Larea_Parameters=options-file

       This option specifies an options file (default file extension
       .opt) that contains a list of logical areas and parameter
       values that RMU Repair uses to update the area inventory page
       (AIP) before it builds the space area management (SPAM) pages.

       The Larea_Parameters options file contains lines in the
       following format:

       name [/Areas=name][/Delete][/[No]Thresholds=(n[,n[,n]])[/Length=n][/Type=option]

       A comment can be appended to the line (an exclamation point
       (!)  is the comment character), and a line can be continued
       (as in DCL) by ending it with a hyphen (-).

       The logical area can be specified by name or identification
       number (ID). The logical area named must be present in the
       AIP, or an error is generated. The Larea_Parameters options
       are further described as follows:

       -  Areas=name

          Restricts this line to the logical area that resides
          in the specified storage area. The storage area can be
          specified by name or ID. By default, all logical areas with
          a matching name are altered independently of the storage
          area in which they reside.

          You can specify storage area ID numbers with the Areas
          qualifier.

       -  Delete

          Specifies that the logical area should be marked as
          deleted. You will corrupt your database if you delete a
          logical area that is referenced by Oracle Rdb metadata.

       -  Length=n

          The Initialize=Length option specifies the record length to
          store in the logical area inventory entry. RMU Repair uses
          this value to calculate SPAM thresholds.

          When columns are deleted from or added to a table, the
          record length stored in the logical area inventory entry is
          not updated. Therefore the search for space needed to store
          a new record may be inefficient, and the SPAM thresholds
          will not be set properly. You can solve this problem by
          first correcting the length in the logical area inventory
          entry, then generating corrected SPAM pages using the RMU
          Repair command. See Example 2 in the Examples help entry
          under this command.

       -  Thresholds=(n [,n [,n]])
          NoThresholds

          This option specifies the logical area SPAM thresholds.
          This is useful only for logical areas that reside in a
          storage area with a uniform page format. If thresholds are
          set, they are ignored in a storage area with a mixed page
          format.

          See the Oracle Rdb7 Guide to Database Performance and
          Tuning for information on setting SPAM thresholds.

          The Nothresholds option specifies that logical area
          thresholds be disabled.

       -  Type=keyword

          By specifying a Type, you can update the on-disk logical
          area type in the AIP. For databases created prior to Oracle
          Rdb release 7.0.1, the logical area type information in the
          AIP is unknown. However, the RMU Show Statistics utility
          depends on this information to display information on a
          per-logical-area basis. A logical area is a table, B-tree
          index, hash index, or any partition of one of these.

          In order to update the on-disk logical area type in the
          AIP, specify the type as follows:

             Type=Table
             Specifies that the logical area is a data table, such as
             is created with the SQL CREATE TABLE statement.

             Type=Btree
             Specifies that the logical area is a B-tree index, such
             as is created with the SQL CREATE INDEX TYPE IS SORTED
             statement.

             Type=Hash
             Specifies that the logical area is a hash index, such
             as is created with the SQL CREATE INDEX TYPE IS HASHED
             statement.

             Type=System
             Specifies that the logical area is a system record
             that is used to identify hash buckets. Users cannot
             explicitly create this type of logical area. This type
             should not be used for the RDB$SYSTEM logical areas. It
             does not identify system relations.

             Type=Blob
             Specifies that the logical area is a BLOB (LIST OF BYTE
             VARYING) repository.

          There is no error checking of the type specified for
          a logical area. The specified type does not affect the
          collection of statistics, nor does it affect the readying
          of the affected logical areas. However, an incorrect type
          will cause incorrect statistics to be reported by the RMU
          Show Statistics utility.

    o  Only_Larea_Type

       The Initialize=Only_Larea_Type option specifies that only the
       logical area type field is to be updated in the area inventory
       page (AIP).

    o  Snapshots

       The Snapshots option allows you to create and initialize new
       snapshot files. In addition, it removes corrupt snapshot area
       pages from the Corrupt Page Table (CPT). This is much faster
       than using the RMU Restore command to do the same thing,
       especially when just one snapshot file is lost and needs to
       be created again. The default is not to create new files.

       When you specify the Confirm option with the
       Initialize=Snapshots option (Initialize=Snapshots=Confirm),
       you can use the RMU Repair command not only to initialize, but
       also to optionally rename, move, or change the allocation of
       snapshot files.

       These operations might be necessary when a disk with a
       snapshot file has a hardware problem or is removed in a
       hardware upgrade, or when a snapshot file has grown too large
       and you want to truncate it.

       The Confirm option causes RMU Repair to prompt you for a
       name and allocation for one or more snapshot files. If you
       use the Areas qualifier, you can select the snapshot files
       in the database that you want to modify. If you omit the
       Areas qualifier, all the snapshot files for the database are
       initialized and RMU Repair prompts you interactively for an
       alternative file name and allocation for each snapshot file.
       By specifying a new file name for a snapshot file, you can
       change the location of the snapshot file. By specifying a new
       allocation for a snapshot file, you can truncate a snapshot
       file or make it larger.

    o  Tsns

       The Initialize=Tsns option resets the database transaction
       state. The default is to not alter the transaction state.

       After-image journaling is disabled when you specify the
       Initialize=Tsns option. You must explicitly enable after-image
       journaling after the RMU Repair command completes if you want
       journaling enabled.

       This operation is useful when the database transaction
       sequence number (TSN) approaches the maximum allowable value
       and the TSN values must be initialized to zero. The TSN value
       is contained in a quadword with the following decimal format:

       high longword : low longword

       The high longword can hold a maximum user value of 32768
       (215) and the low longword can hold a maximum user value of

       4,294,967,295 (232). A portion of the high-longword is used by

       Oracle Rdb for overhead.

       Initialization of the TSN values requires reading and writing
       to each page of the database, so the Areas qualifier is not
       meaningful. It also requires initialization of the snapshot
       areas even if the Snapshots option has not been specified.

       The Tsns initialization option carries the following
       restrictions:

       -  It cannot be performed if the Replication Option for Rdb
          is being used unless all transfers have been completed. RMU
          Repair will ask for confirmation if an RDB$TRANSFERS table
          is defined.

       -  Old journal files will not be applicable to this repaired
          database. After TSNs have been initialized, you must
          reenable after-image journaling if you want journaling
          enabled.

          After the RMU Repair command completes, a full and complete
          backup operation should be performed on the database as
          soon as is practical. This operation ensures that new
          journaled changes can be applied to the restored database
          in the event that a restore operation should become
          necessary.

4.6  –  Spams

    Spams
    Nospams

    Reconstructs the SPAM pages for the areas you specify with the
    Areas qualifier. If you specify the Nospams qualifier, the SPAM
    pages are not reconstructed. The default is the Spam qualifier
    if you do not specify any of the following qualifiers for the RMU
    Repair command:

    o  ABM

    o  Initialize=Free_Pages

    o  Initialize=Snapshots

    o  Initialize=Snapshots=Confirm

    If you use any of these qualifiers, the NoSpam qualifier is the
    default.

    When columns are deleted from or added to a table, the record
    length stored in the logical area inventory entry is not updated.
    Therefore the search for space needed to store a new record may
    be inefficient, and the SPAM thresholds will not be set properly.
    You can solve this problem by first correcting the length in
    the logical area inventory entry, then generating corrected SPAM
    pages using the RMU Repair command. See Example 2 in the Examples
    help entry under this command.

4.7  –  Tables

    Tables[=table-list]

    Specifies the list of tables that you want RMU Repair to check
    for complete segmented strings.

    If no tables are listed, then all nonsystem tables are examined.
    (System tables do not store their segmented strings in write-once
    areas.) Note that RMU Repair has no knowledge of which storage
    areas contain segmented strings from a particular table; thus,
    the default is to search all tables.

5  –  Usage Notes

    o  To use the RMU Repair command for a database, you must have
       the RMU$ALTER privilege in the root file access control
       list (ACL) for the database or the OpenVMS SYSPRV or BYPASS
       privilege.

    o  Enable detected asynchronous prefetch 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
       RMU Repair 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 Areas qualifier can be used with indirect file references.
       See the Indirect-Command-Files help entry.

    o  Oracle Corporation recommends that you use the RMU Backup
       command to perform a full backup operation on your database
       before using the RMU Repair command on the database.

    o  Use the SQL SHOW STORAGE AREA statement to display the new
       location of a snapshot (.snp) file and the RMU Dump command
       with the Header qualifier to display the new allocation.

    o  Be careful when you specify names for new .snp files with the
       RMU Repair command. If you specify the name of a file that
       already exists and was created for the database, it will be
       initialized as you requested.

       If you mistakenly initialize a live database file in this way,
       do not use the database until the error is corrected. Use the
       RMU Restore command to restore the database to the condition
       it was in when you backed it up just prior to issuing the RMU
       Repair command. If you did not back up the database before
       issuing the RMU Repair command, you must restore the database
       from your most recent backup file and then recover from .aij
       files (if the database had after-image journaling enabled).

       If you specify the wrong .snp file (for example, if you
       specify jobs.snp for all the .snp file name requests in
       Example 3 in the Examples help entry under this command),
       you can correct this by issuing the RMU Repair command again
       with the correct .snp file names.

       After the RMU Repair command completes, delete old .snp
       files and use the RMU Backup command to perform a full backup
       operation on your database.

6  –  Examples

    Example 1

    The following command repairs SPAM page corruption for all the
    storage areas in the mf_personnel database. No area bit map
    (ABM) pages are reconstructed because the Abm qualifier is not
    specified.

    $ RMU/REPAIR MF_PERSONNEL

    Example 2

    When columns are deleted from or added to a table, the record
    length stored in the logical area inventory entry is not updated.
    Therefore the search for space needed to store a new record may
    be inefficient, and the SPAM thresholds will not be set properly.
    You can solve this problem by first correcting the length in
    the logical area inventory entry, then generating corrected SPAM
    pages using the RMU Repair command.

    For example, suppose the Departments table was stored in the
    departments.rda uniform page format storage area and the Budget_
    Projected column (integer data type = 4 bytes) was deleted. As
    a result of this deletion, the row length changed from 47 bytes
    to 43 bytes. You can specify a smaller record length (43 bytes)
    in the fix_departments.opt options file to more efficiently use
    space in the storage area.

    $ CREATE FIX_DEPARTMENTS.OPT
    DEPARTMENTS /LENGTH=43

    Then, the following RMU Repair command specifies the record
    length to store in the logical area inventory entry for this
    logical area and rebuilds the SPAM pages:

    $ RMU/REPAIR/SPAMS/INITIALIZE=LAREA_PARAMETERS=FIX_DEPARTMENTS.OPT -
    _$ MF_PERSONNEL

    Example 3

    The following RMU Repair command initializes and renames
    departments.snp; initializes and moves salary_history.snp; and
    initializes, moves, and truncates jobs.snp:

    $ RMU/REPAIR/NOSPAMS/INITIALIZE=SNAPSHOTS=CONFIRM -
    _$ /AREAS=(DEPARTMENTS,JOBS,SALARY_HISTORY) MF_PERSONNEL
    %RMU-I-FULBACREQ, A full backup of this database should be
     performed after RMU Repair
    Area DEPARTMENTS snapshot filename
     [SQL1:[TEST]DEPARTMENTS.SNP;1]: NEW_DEPT
    Area DEPARTMENTS snapshot file allocation [10]?
    Area SALARY_HISTORY snapshot filename
     [SQL1:[TEST]SALARY_HISTORY.SNP;1]: SQL2:[TEST]
    Area SALARY_HISTORY snapshot file allocation [10]?
    Area JOBS snapshot filename [SQL1:[TEST]JOBS.SNP;1]: SQL2:[TEST2]
    Area JOBS snapshot file allocation [10]? 5

    Example 4

    The following RMU Repair command finds incorrect checksums in the
    EMPIDS_LOW storage area and updates them to reflect the correct
    checksum:

    $ RMU/REPAIR MF_PERSONNEL.RDB/AREA=EMPIDS_LOW/CHECKSUM

    Example 5

    The following command updates an AIP type for a table:

    $ RMU/REPAIR MF_PERSONNEL /INITIALIZE=LAREA_PARAMETERS=TABLE.OPT

    Type the TABLE.OPT file to show the contents of the file.

    $ TYPE TABLE.OPT
    EMPLOYEES /TYPE=TABLE

    Example 6

    The following command updates an AIP type for a storage area:

    $ RMU/REPAIR MF_PERSONNEL /INITIALIZE=LAREA_PARAMETERS=AREAS.OPT

    Type the AREAS.OPT file to show the contents of the file.

    $ TYPE AREAS.OPT
    EMPLOYEES /AREA=EMPIDS_OVER /TYPE=TABLE
Close Help