本帖最后由 botang 于 2016-1-8 17:37 编辑
(52-21)上完1Z0-052第18章
100^(193-193-0)(2-1)=1 100^(193-193-0)(11-1)=10 100^(194-193-0)(2-1)=100 100^(194-193-0)(11-1)=1000 100^(194-193-0)(2-1)+ 100^(194-193-1)(11-1)=110 100^(194-193-0)(12-1)=1100 100^(62-62-0)(101-100)=1 100^(62-62-0)(101-91)=10 100^(62-61-0)(101-100)=100 123456.789 100^(195-193-0)(13-1)+ 100^(195-193-1)(35-1)+ 100^(195-193-2)(57-1)+ 100^(195-193-3)(79-1)+ 100^(195-193-4)(91-1)=120000+3400+56+0.78+0.009= 123456.789 -123456.789 100^(62-60-0)(101-89)+ 100^(62-60-1)(101-67)+ 100^(62-60-2)(101-45)+ 100^(62-60-3)(101-23)+ 100^(62-60-4)(101-11)=120000+3400+56+0.78+0.009= -123456.789 -123456.78901 100^(62-60-0)(101-89)+ 100^(62-60-1)(101-67)+ 100^(62-60-2)(101-45)+ 100^(62-60-3)(101-23)+ 100^(62-60-4)(101-11)+ 100^(62-60-5)(101-91) =120000+3400+56+0.78+0.009+ 0.00001= -123456.78901 - select * from v$backup_corruption;
- select * from v$copy_corruption;
- select * from v$database_block_corruption;
- drop tablespace tbs05309 including contents and datafiles ;
- create tablespace tbs05309 datafile size 5M nologging;
- ---
- BEGIN
- DBMS_REPAIR.ADMIN_TABLES (
- table_name => 'REPAIR_TABLE',
- table_type => DBMS_REPAIR.REPAIR_TABLE,
- action => DBMS_REPAIR.CREATE_ACTION,
- tablespace => 'USERS');
- END;
- BEGIN
- DBMS_REPAIR.ADMIN_TABLES (
- table_name => 'ORPHAN_KEY_TABLE',
- table_type => DBMS_REPAIR.ORPHAN_TABLE,
- action => DBMS_REPAIR.CREATE_ACTION,
- tablespace => 'USERS');
- END;
- select * from REPAIR_TABLE;
- select * from ORPHAN_KEY_TABLE;
- DECLARE
- num_corrupt INT;
- BEGIN
- num_corrupt := 0;
- DBMS_REPAIR.CHECK_OBJECT (
- schema_name => 'HR',
- object_name => 'T05309',
- repair_table_name => 'REPAIR_TABLE',
- corrupt_count => num_corrupt);
- dbms_output.put_line( 'Find '|| num_corrupt||' Bolcks.' );
- END;
- select * from REPAIR_TABLE;
- select * from ORPHAN_KEY_TABLE;
- DECLARE
- num_orphans INT;
- BEGIN
- num_orphans := 0;
- DBMS_REPAIR.DUMP_ORPHAN_KEYS (
- schema_name => 'HR',
- object_name => 'ICOL1',
- 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;
- DECLARE
- num_orphans INT;
- BEGIN
- num_orphans := 0;
- DBMS_REPAIR.DUMP_ORPHAN_KEYS (
- schema_name => 'HR',
- object_name => 'ICOL2',
- 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;
- select * from ORPHAN_KEY_TABLE;
- begin
- dbms_repair.skip_corrupt_blocks('HR','T05309');
- end;
- -----
- select * from ORPHAN_KEY_TABLE;
-
- select dump(key) from orphan_key_table where keyrowid||' '='AAAUi7AIgAAAIABAAA'||' ';
- ASCII
-
- WULONGW
- 1979 640K IBM sort >2 SDL oracle;
-
- -------
- -------
- 195 13 49 69 11
- 120000+4800+68+0.1=124868.1
- 100^(195-193-0)(13-1)+
- 100^(195-193-1)(49-1)+100^(195-193-2)(69-1) +100^(195-193-3)(11-1)
- ----
- ----
-
-
-
-
-
复制代码
|