VMS Help  —  RMU72  Verify  Examples
    Example 1

    The following command verifies the entire mf_personnel database
    because the All qualifier is specified:

    $ RMU/VERIFY/ALL/LOG MF_PERSONNEL.RDB

    Example 2

    The following command verifies the storage areas EMPIDS_LOW,
    EMPIDS_MID, and EMPIDS_OVER in the mf_personnel database:

    $ RMU/VERIFY/AREAS=(EMPIDS_LOW,EMPIDS_MID,EMPIDS_OVER)/LOG -
    _$ MF_PERSONNEL.RDB

    Example 3

    The following command performs only a checksum verification on
    all the storage areas in the database called large_database. The
    Checksum_Only qualifier quickly detects obvious checksum problems
    with the database. If a checksum problem is found on a page, you
    can dump the page by using the RMU Dump command, and verify the
    appropriate logical areas and indexes.

    $ RMU/VERIFY/AREAS=*/CHECKSUM_ONLY/LOG LARGE_DATABASE

    Example 4

    The following command verifies the Candidates and Colleges
    tables:

    $ RMU/VERIFY/LAREAS=(CANDIDATES,COLLEGES)/LOG MF_PERSONNEL.RDB

    Example 5

    The following example displays the behavior of the index
    verification method Oracle RMU employs beginning in Oracle Rdb
    V7.0. The first RMU Verify command shows the log output when the
    command is issued under Oracle Rdb V6.1. The second RMU Verify
    command shows the log output when the command is issued under
    Oracle Rdb V7.0.

    $ @SYS$LIBRARY:RDB$SETVER 6.1
    $ SET DEF DB1:[V61]
    $ RMU/VERIFY/INDEXES=EMP_EMPLOYEE_ID/DATA MF_PERSONNEL.RDB/LOG
    %RMU-I-BGNROOVER, beginning root verification
    %RMU-I-ENDROOVER, completed root verification
    %RMU-I-DBBOUND, bound to database "DB1:[V61]MF_PERSONNEL.RDB;1"
    %RMU-I-OPENAREA, opened storage area RDB$SYSTEM for protected retrieval
    %RMU-I-BGNAIPVER, beginning AIP pages verification
    %RMU-I-ENDAIPVER, completed AIP pages verification
    %RMU-I-BGNABMSPM, beginning ABM pages verification
    %RMU-I-OPENAREA, opened storage area MF_PERS_SEGSTR for protected retrieval
    %RMU-I-ENDABMSPM, completed ABM pages verification
    %RMU-I-BGNNDXVER, beginning verification of index EMP_EMPLOYEE_ID
    %RMU-I-OPENAREA, opened storage area EMPIDS_LOW for protected retrieval
    %RMU-I-OPENAREA, opened storage area EMPIDS_MID for protected retrieval
    %RMU-I-OPENAREA, opened storage area EMPIDS_OVER for protected retrieval
    %RMU-I-ENDNDXVER, completed verification of index EMP_EMPLOYEE_ID
    %RMU-I-CLOSAREAS, releasing protected retrieval lock on all storage areas
    %RMU-S-ENDVERIFY, elapsed time for verification :    0 00:00:09.14
    $ @SYS$LIBRARY:RDB$SETVER 7.0
    $ SET DEF DB1:[V70]
    $ RMU/VERIFY/INDEXES=EMP_EMPLOYEE_ID/DATA MF_PERSONNEL.RDB/LOG
    %RMU-I-BGNROOVER, beginning root verification
    %RMU-I-ENDROOVER, completed root verification
    %RMU-I-DBBOUND, bound to database "DB1:[V70]MF_PERSONNEL.RDB;1"
    %RMU-I-OPENAREA, opened storage area RDB$SYSTEM for protected retrieval
    %RMU-I-BGNAIPVER, beginning AIP pages verification
    %RMU-I-ENDAIPVER, completed AIP pages verification
    %RMU-I-BGNABMSPM, beginning ABM pages verification
    %RMU-I-ENDABMSPM, completed ABM pages verification
    %RMU-I-BGNNDXVER, beginning verification of index EMP_EMPLOYEE_ID
    %RMU-I-OPENAREA, opened storage area EMPIDS_LOW for protected retrieval
    %RMU-I-OPENAREA, opened storage area EMPIDS_MID for protected retrieval
    %RMU-I-OPENAREA, opened storage area EMPIDS_OVER for protected retrieval
    %RMU-I-ENDNDXVER, completed verification of index EMP_EMPLOYEE_ID
    %RMU-I-BSGPGLARE, beginning verification of EMPLOYEES logical area
                      as part of EMPIDS_LOW storage area
    %RMU-I-ESGPGLARE, completed verification of EMPLOYEES logical area
                      as part of EMPIDS_LOW storage area
    %RMU-I-BSGPGLARE, beginning verification of EMPLOYEES logical area
                      as part of EMPIDS_MID storage area
    %RMU-I-ESGPGLARE, completed verification of EMPLOYEES logical area
                      as part of EMPIDS_MID storage area
    %RMU-I-BSGPGLARE, beginning verification of EMPLOYEES logical area
                      as part of EMPIDS_OVER storage area
    %RMU-I-ESGPGLARE, completed verification of EMPLOYEES logical area
                      as part of EMPIDS_OVER storage area
    %RMU-I-IDXVERSTR, Beginning index data verification of logical area 69
     (EMPLOYEES).
    %RMU-I-IDXVEREND, Completed data verification of logical area 69.
    %RMU-I-IDXVERSTR, Beginning index data verification of logical area 70
     (EMPLOYEES).
    %RMU-I-IDXVEREND, Completed data verification of logical area 70.
    %RMU-I-IDXVERSTR, Beginning index data verification of logical area 71
     (EMPLOYEES).
    %RMU-I-IDXVEREND, Completed data verification of logical area 71.
    %RMU-I-CLOSAREAS, releasing protected retrieval lock on all storage areas
    %RMU-S-ENDVERIFY, elapsed time for verification :    0 00:00:11.36

    Example 6

    The following example loads data into a table, verifies
    the table, and then identifies loaded rows that violated a
    constraint.

    Because the Noconstraints qualifier is specified with the RMU
    Load command, data that violates database integrity might be
    added to the database. The second RMU Verify command verifies the
    table that was just loaded and reveals that data that violates
    constraints on the table was indeed loaded.

    An SQL command is issued to determine which rows violated the
    constraint so that they can either be removed from the database,
    or added to the EMPLOYEES table to restore database integrity.
    The final RMU Verify command checks the constraint again to
    ensure that changes made have restored the integrity of the
    database.

    $ !
    $ ! Load data into the JOB_HISTORY table of the mf_personnel database.
    $ ! Specify the Noconstraints qualifier:
    $ !
    $ RMU/LOAD/RECORD_DEFINITION=(FILE=JOB_HIST.RRD, FORMAT=TEXT) -
    _$ MF_PERSONNEL.RDB JOB_HISTORY JOB_HIST.UNL/NOCONSTRAINTS
    %RMU-I-DATRECREAD,  18 data records read from input file.
    %RMU-I-DATRECSTO,   18 data records stored.
    $ !
    $ ! Verify the JOB_HISTORY table:
    $ !
    $ RMU/VERIFY/CONSTRAINTS=(TABLE=JOB_HISTORY) MF_PERSONNEL.RDB
    %RMU-W-CONSTFAIL, Verification of constraint "JOB_HISTORY_FOREIGN1"
     has failed.
    $ !
    $ ! Issue SQL statements to determine what the definition of the
    $ ! constraint is and which of the loaded rows violated
    $ ! the constraint.  Then issue an SQL command to insert data that will
    $ ! restore the data integrity of the database:
    $ SQL
    SQL> ATTACH 'FILENAME MF_PERSONNEL.RDB';
    SQL> SHOW TABLE JOB_HISTORY
       .
       .
       .
    JOB_HISTORY_FOREIGN1
     Foreign Key constraint
     Column constraint for JOB_HISTORY.EMPLOYEE_ID
     Evaluated on COMMIT
     Source:
            JOB_HISTORY.EMPLOYEE_ID REFERENCES EMPLOYEES (EMPLOYEE_ID)
       .
       .
       .
    SQL> SELECT DISTINCT(EMPLOYEE_ID)
    cont> FROM JOB_HISTORY
    cont> WHERE NOT EXISTS
    cont>           (SELECT *
    cont>          FROM EMPLOYEES AS E
    cont>          WHERE E.EMPLOYEE_ID = JOB_HISTORY.EMPLOYEE_ID);
    EMPLOYEE_ID
     10164
     10165
     10166
     10167
     10168
     10169
    6 rows selected
    SQL> INSERT INTO EMPLOYEES (EMPLOYEE_ID, LAST_NAME)
    cont> VALUES ('10164', 'Smith');
    SQL> INSERT INTO EMPLOYEES (EMPLOYEE_ID, LAST_NAME)
    cont> VALUES ('10165', 'Frederico');
    SQL> INSERT INTO EMPLOYEES (EMPLOYEE_ID, LAST_NAME)
    cont> VALUES ('10166', 'Watts');
    SQL> INSERT INTO EMPLOYEES (EMPLOYEE_ID, LAST_NAME)
    cont> VALUES ('10167', 'Risley');
    SQL> INSERT INTO EMPLOYEES (EMPLOYEE_ID, LAST_NAME)
    cont> VALUES ('10168', 'Pietryka');
    SQL> INSERT INTO EMPLOYEES (EMPLOYEE_ID, LAST_NAME)
    cont> VALUES ('10169', 'Jussaume');
    SQL> COMMIT;
    SQL> EXIT
    $ !
    $ ! Check that data integrity has been restored:
    $ !
    $ RMU/VERIFY/CONSTRAINTS=(CONSTRAINTS=JOB_HISTORY_FOREIGN1, -
    _$ TABLE=JOB_HISTORY) MF_PERSONNEL.RDB
    $ !
    $ ! No messages are returned.  Data integrity has been restored.

    Example 7

    The following example creates an external function in which
    the external name is incorrect. When the function is verified,
    Oracle RMU cannot find the entry point and returns an error. The
    external function is then dropped and then re-created correctly.
    The verification now succeeds:

    $ ! Attach to database and create a function.  The external name is
    $ ! mistyped:
    $ !
    SQL> ATTACH 'filename mf_personnel.rdb';
    SQL> create function SQRT (in double precision) returns double precision;
    cont> external name MTH$SORT location 'SYS$SHARE:MTHRTL'
    cont> language GENERAL
    cont> GENERAL PARAMETER STYLE;
    SQL> COMMIT;
    SQL> EXIT;
    $ !
    $ ! Verify the function:
    $ !
    $ RMU/VERIFY/ROUTINES MF_PERSONNEL.RDB
    %RMU-E-NOENTRPT,  No entry point found for external routine SQRT.
                           Image name is SYS$SHARE:MTHRTL.
                           Entry point is MTH$SORT.
    $ !
    $ ! Oracle RMU cannot find the entry point.  Drop the
    $ ! function and reenter correctly:
    $ !
    $ SQL
    SQL> ATTACH 'FILENAME mf_personnel.rdb';
    SQL> DROP FUNCTION SQRT;
    SQL> create function SQRT (in double precision) returns double precision;
    cont> external name MTH$SQRT location 'SYS$SHARE:MTHRTL'
    cont> language GENERAL
    cont> GENERAL PARAMETER STYLE;
    SQL> COMMIT;
    SQL> EXIT;
    $ !
    $ ! Verification is now successful:
    $ !
    $ RMU/VERIFY/ROUTINES MF_PERSONNEL.RDB

    Example 8

    The following example demonstrates that the RMU Verify command
    verifies disabled constraints only when you explicitly specify
    the disabled constraint.

    $ SQL
    SQL> ATTACH 'FILENAME MF_PERSONNEL.RDB';
    SQL> -- Disable the EMP_SEX_VALUES constraint.
    SQL> ALTER TABLE EMPLOYEES DISABLE CONSTRAINT EMP_SEX_VALUES;
    SQL> COMMIT;
    SQL> -- Insert a value that violates the EMP_SEX_VALUES constraint.
    SQL> INSERT INTO EMPLOYEES
    cont> (EMPLOYEE_ID, LAST_NAME, SEX)
    cont> VALUES ('99999', 'JICKLING', 'G');
    1 row inserted
    SQL> COMMIT;
    SQL> EXIT;
    $ !
    $ ! The following two verify commands do not return an error
    $ ! because the disabled constraint is not explicitly specified.
    $ !
    $ RMU/VERIFY MF_PERSONNEL.RDB
    $ RMU/VERIFY MF_PERSONNEL.RDB/CONSTRAINTS
    $ !
    $ ! The following verify command returns an warning message to
    $ ! inform you that data that violates the disabled constraint
    $ ! has been inserted into the database.
    $ !
    $ RMU/VERIFY MF_PERSONNEL.RDB/CONSTRAINT=(CONSTRAINT=EMP_SEX_VALUES)
    %RMU-W-CONSTFAIL, Verification of constraint "EMP_SEX_VALUES" has failed.
Close Help