DBAsupport.com Forums - Powered by vBulletin
Results 1 to 10 of 10

Thread: DBMS_REPAIR - marking blocks corrupt

Threaded View

  1. #5
    Join Date
    Oct 2002
    Posts
    807
    I haven't used dbms_repair extensively. I've got a few fractured corrupt blocks on a huge table. I intending marking the blocks corrupt and leaving things as is.
    So, yes - I obviously know the objects. 2 blocks of tabledata and 2 blocks of index data. I can't get the damn dbms_repair.fix_corrupt_blocks to work. See "num fix : 0" at bottom.


    SET SERVEROUTPUT ON
    DECLARE num_corrupt INT;
    BEGIN
    num_corrupt := 0;
    DBMS_REPAIR.CHECK_OBJECT (
    SCHEMA_NAME => 'COURT',
    OBJECT_NAME => 'CASE_DOCKET_PARAMETERS',
    PARTITION_NAME => 'CDP_8',
    REPAIR_TABLE_NAME => 'REPAIR_TABLE',
    CORRUPT_COUNT => num_corrupt);
    DBMS_OUTPUT.PUT_LINE('number corrupt: ' || TO_CHAR (num_corrupt));
    END;
    number corrupt: 2

    PL/SQL procedure successfully completed.

    ----------

    SET SERVEROUTPUT ON
    DECLARE num_orphans INT;
    BEGIN
    num_orphans := 0;
    DBMS_REPAIR.DUMP_ORPHAN_KEYS (
    SCHEMA_NAME => 'COURT',
    OBJECT_NAME => 'PK_CASE_DOCKET_PARAMETERS',
    OBJECT_TYPE => dbms_repair.index_object,
    REPAIR_TABLE_NAME => 'REPAIR_TABLE',
    ORPHAN_TABLE_NAME=> 'ORPHAN_KEY_TABLE',
    KEY_COUNT => num_orphans);
    DBMS_OUTPUT.PUT_LINE('orphan key count: ' || TO_CHAR(num_orphans));
    END;
    /

    orphan key count: 177

    PL/SQL procedure successfully completed.
    ------------


    BEGIN
    DBMS_REPAIR.SKIP_CORRUPT_BLOCKS (
    SCHEMA_NAME => 'COURT',
    OBJECT_NAME => 'CASE_DOCKET_PARAMETERS',
    OBJECT_TYPE => dbms_repair.table_object,
    FLAGS => dbms_repair.skip_flag);
    END;
    /
    PL/SQL procedure successfully completed.
    ------

    SET SERVEROUTPUT ON
    DECLARE num_fix INT;
    BEGIN
    num_fix := 2;
    DBMS_REPAIR.FIX_CORRUPT_BLOCKS (
    SCHEMA_NAME => 'COURT',
    OBJECT_NAME=> 'CASE_DOCKET_PARAMETERS',
    PARTITION_NAME => 'CDP_8',
    OBJECT_TYPE => dbms_repair.table_object,
    REPAIR_TABLE_NAME => 'REPAIR_TABLE',
    FIX_COUNT=> num_fix);
    DBMS_OUTPUT.PUT_LINE('num fix: ' || TO_CHAR(num_fix));
    END;
    /
    num fix: 0

    PL/SQL procedure successfully completed
    Last edited by Axr2; 09-17-2004 at 11:37 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width