7.8. Answers to Review Questions

  1. A. Most block corruption is caused by human error introducing bugs with new hardware, software, or firmware changes.

  2. D. Monitoring the ALERT.LOG and associated trace files is the best method for detecting block corruption in the database.

  3. B. If the ANALYZE command is being run by a DBA account, you need to prefix the table name with the schema owner.

  4. B. The ANALYZE command determines which object has corrupted indexes or tables, because the command returns an error if the statement does not process completely. The ANALYZE command does not identify which block is corrupt.

  5. C. The DBVERIFY utility uses the term pages instead of blocks. The DBVERIFY utility determines the amount of corrupt pages in a datafile.

  6. B. The DBVERIFY utility can be used on online and offline datafiles.

  7. A. The correct syntax for the DBVERIFY utility to write the output to a log and specify a 4k block size is as follows: dbv blocksize=4096 file=data01.dbf logfile=c: empdata01.log.

  8. A. DB_BLOCK_CHECKING is enabled for the SYSTEM tablespace by default. The SYS user default tablespace is SYSTEM.

  9. B. DB_BLOCK_CHECKING is a database parameter that causes Oracle to perform checksums on blocks every time the block is modified.

  10. B. The correct use of the DBMS_REPAIR package on the DATA tablespace is to use the ADMIN_TABLES procedure with the following parameters:

    declare
       begin
       dbms_repair.admin_tables
       (table_name => 'REPAIR_TABLE',
       table_type => dbms_repair.repair_table,
       action => dbms_repair.create_action,
       tablespace => 'DATA'),
       end;
       /

  11. C. The DBMS_REPAIR package must be used with the CHECK_OBJECT procedure. If you want to verify REPAIR BLOCK COUNT, you must have SET SERVEROUTPUT ON SIZE. The following is the correct PL/SQL syntax for the DBMS_REPAIR package:

    set serveroutput on size 100000;
       declare

       rpr_count int;
       begin
       rpr_count := 0;
       dbms_repair.check_object(
       schema_name => 'SCOTT',
       object_name => 'EMPLOYEE',
       repair_table_name => 'REPAIR_TABLE',
       corrupt_count => rpr_count);
       dbms_output.put_line('repair block count: '
       ||to_char(rpr_count));
       end;

  12. D. Referential integrity constraints on related tables can be broken, indexes can become out of sync with the table data, and triggers on a table can cause logical corruption if they are not well understood when using the DBMS_REPAIR package on a table.

  13. C. The DBMS_REPAIR package can be used to identify problems with a primary index by identifying orphaned keys in the index as they relate to the table being repaired for corruption. The correct usage of the DBMS_REPAIR.DUMP_ORPHANED_KEYS package procedure is as follows:

    declare
        orph_count int;
      begin
        orph_count:= 0;
      dbms_repair.dump_orphan_keys (
           schema_name => 'SCOTT',
           object_name => 'EMPLOYEE_PK',
           object_type => dbms_repair.index_object,
           repair_table_name => 'REPAIR_TABLE',
          orphan_table_name => 'ORPHAN_KEY_TABLE',
          key_count => orph_count);
          dbms_output.put_line('orphan-index entries: ' || to_char(orph_count));
      end;
      /

  14. B. REPAIR_TABLE will show OBJECT_NAME, BLOCK_ID, and if the block is MARKED_CORRUPT.

  15. C. When determining how to resolve block corruption, you should determine the extent of the corruption first. Is the corruption limited to a few blocks or is it widespread?

  16. D. The DBMS_REPAIR package can be used to rebuild freelists on a corrupt table with the following syntax:

    declare
      begin

    dbms_repair.rebuild_freelists (
      schema_name => 'SCOTT',
      object_name => 'EMPLOYEE',
      object_type => dbms_repair.table_object);
    end;
    /

  17. C. Resolving block corruption can result in the loss of data in the blocks that are corrupt. You should contact Oracle Support, if possible.

  18. D. Before using the DBMS_REPAIR package, consider other alternatives to resolve the block corruption. Make sure you understand how else to resolve block corruption, as a backup plan if necessary.

  19. C, D. The ORA-01578 error in the ALERT.LOG specifies the datafile number and the block number.

  20. A, D. BMR must be performed with RMAN only. Incremental backups cannot be used to perform BMR, because incremental backups consist of changed blocks only. All redo logs are not required to perform BMR if the damaged block does not require those redo logs.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset