Block corruption nologging

Hi,
Db :11.2
Some of the blocks are corrupted on the database.It shows nologging in corruption_type column in  v$database_block_corruption.
It's a test envirnoment,archive not enabled.
Should i restore old backup? or any other way to solve it.
Reagards,
Raj

NOLOGGING corruption seems to be a largely misunderstood phenomenon.
Normally, all data changes are logged to the redo log.  Oracle logs the "change vectors" to the redo log.  In the event of a corruption, you restore the datafile from a backup, and then apply archivelogs to the datafile, to apply all the changes from the time of the backup until the time of the corruption.  The idea is, you're "playing back" the transactions that were recorded in the redo logs.  Oracle will apply all changes from all archived redo logs, and then all changes from the online redo logs.  In this way, you can recover up to the last committed transaction.
Now, in the event of a NOLOGGING operation, Oracle does *not* record your change in the redo log.  Instead, it only writes extent invalidation records.  During normal operation, this is ok, as NOLOGGING changes are written directly to the datafile.  But, what happens if you do a recovery, from a backup taken *before* the NOLOGGING operation?  Well, when the archived redo log is applied, and it gets to the point where the NOLOGGING operation took place, there's no data recorded in the redo log.  Instead, it writes those extent invalidation records.  So, there's no error at recovery time, but then, when you try to access data in that block, you get an ORA-26040 "Data was loaded using the NOLOGGING option".  Oracle has no choice, cause the data is simply not available.
So, the only real solution is to reload the data.  If it's an index, it's easy, simply rebuild the index.  If it's a table, it may be more problematic.  You'll need to truncate the table, and reload the data.  If it's a partitioned table, you should be able to only truncate and reload the affected partition(s).
Finally, how to avoid this situation in the future?  Well, all you need to do is make sure you schedule a backup *after* you complete your NOLOGGING data loads.  Keep in mind, in a NOLOGGING data load is written directly to the datafiles, so if you take a backup after the NOLOGGING load is complete, then you'll have that data in the datafiles that were backed up.  No need to apply those logs w/ the NOLOGGING extent invalidation records, cause they will be older than the datafiles.
Hope that's clear,
-Mark

Similar Messages

  • Old corrupted blocks in nologging mode.

    Dear All,
    I m facing issue of block corruption, when I check through select from v$database_block_corruption it shows total 511 blocks corrupted and below is one result. This are old one and not having backup for the same.
    But when I validate the backup it shows no error. How to resolve this.....
    FILE# BLOCK# BLOCKS CORRUPTION_CHANGE# CORRUPTIO
    11 3638851 6 5.4254E+12 NOLOGGING

    the RMAN backup validate to check block corruption will return if any ACTIVE DB blocks are corrupted or not. So to my knowledge the corrupted blocks u have are not being used by the DB for any read/write hence RMAN backup is not returning an information about the block corruption. The DBverify is an old version if RMAN did not find the corruption then DBVerify will also not return anything. So if RMAN des nt return any block corruption then you will not have any DB outage.

  • Block corruption on Standby database

    Oracle 10g R2 64bit on Solaris 10 installed on two database server, Sun M5000 and Sun V890
    Primary and physical Standby database is configured with Max performance Async mode, log shipping is ok, archive logs are also applying..
    I opened the standby database on readonly mode, couple of SQLs are running successfully but few SQLS are throwing error meesaage, here is log message -
    SQL> select count(1) from inventory_stock;
    select count(1) from inventory_stock
    ERROR at line 1:
    ORA-01578: ORACLE data block corrupted (file # 12, block # 28109)
    ORA-01110: data file 12: '/backup1/np13/data/invindx01.dbf'
    ORA-26040: Data block was loaded using the NOLOGGING option
    However there is no error meesage recorded in Alert log files related to block corruption. Please suggest

    select file#,UNRECOVERABLE_CHANGE#,UNRECOVERABLE_TIME
    from V$DATAFILE
    where UNRECOVERABLE_TIME is not null
    FILE# UNRECOVERABLE_CHANGE# UNRECOVER
    4 9.7333E+12 12-SEP-10
    5 9.7333E+12 12-SEP-10
    6 9.7333E+12 12-SEP-10
    7 9.7333E+12 12-SEP-10
    9 9.7333E+12 12-SEP-10
    12 9.7333E+12 13-SEP-10
    13 9.7333E+12 13-SEP-10
    14 9.7327E+12 01-SEP-10
    15 9.7333E+12 13-SEP-10
    17 9.7333E+12 13-SEP-10
    22 9.7333E+12 13-SEP-10
    23 9.7333E+12 13-SEP-10
    24 9.7333E+12 13-SEP-10
    32 9.7333E+12 13-SEP-10
    33 9.7333E+12 13-SEP-10
    34 9.7333E+12 13-SEP-10
    35 9.7333E+12 13-SEP-10
    41 9.7324E+12 25-AUG-10
    42 9.7333E+12 13-SEP-10
    43 9.7333E+12 13-SEP-10
    44 9.7333E+12 13-SEP-10
    45 9.7333E+12 13-SEP-10
    57 9.7332E+12 11-SEP-10
    60 9.7333E+12 13-SEP-10
    62 9.7333E+12 12-SEP-10
    63 9.7333E+12 13-SEP-10
    65 9.7333E+12 13-SEP-10
    66 9.7333E+12 13-SEP-10
    68 9.7333E+12 13-SEP-10
    70 9.7333E+12 13-SEP-10
    71 9.7333E+12 12-SEP-10
    73 9.7333E+12 12-SEP-10
    74 9.7333E+12 13-SEP-10
    75 9.7333E+12 12-SEP-10
    77 9.7324E+12 25-AUG-10
    79 9.7333E+12 13-SEP-10
    83 9.7333E+12 13-SEP-10
    84 9.7333E+12 13-SEP-10
    86 9.7333E+12 13-SEP-10
    87 9.7333E+12 12-SEP-10
    89 9.7333E+12 12-SEP-10

  • Database Block Corruption

    Dear Experts,
    In our BW system, from the alert log we have found that one oracle block was corrupted.
    > ORA-01578: ORACLE data block corrupted (file # 137, block #
    > 516877)#ORA-01110: data file 137:
    > '/oracle/PBP/sapdata1/sr3_121/sr3.data121'#ORA-26040: Data
    > block was loaded using the NOLOGGING option
    Database error 1578
    Database error 1578 at FET
    > ORA-01578: ORACLE data block corrupted (file # 137, block #
    > 516877)#ORA-01110: data file 137:
    > '/oracle/PBP/sapdata1/sr3_121/sr3.data121'#ORA-26040: Data
    > block was loaded using the NOLOGGING option
    Database error 1578
    From the SAP Market place we have found one KBA (1812719 - Avoid NOLOGGING during the index creation) which says that it was not really a corruption and it can be cleared by rebuilding the index.
    Can any one please help us how to find the index present in that block. I have tried with below command which returns no rows.
    SQL> select segment_name, partition_name, segment_type, block_id, blocks from dba_extents where (516877 between block_id and (block_id + blocks - 1)) and file_id = 137 and rownum < 2;
    no rows selected
    SQL>
    Please suggest how to find the index for rebuilding the same for clearing the corruption.
    Thanks
    Suresh

    Hi Suresh,
    Kindly check SAP Notes  365481 - Block corruptions
    1559652 - How to deal with block corruptions on Oracle
    923919 - Advanced Oracle block checking features
    Regards,
    Gaurav

  • Data block corrupted on standby database (logical corruption)

    Hi all,
    we are getting the below error on our DRSITE,it is MANUAL PHYSCIAL STANDBY DATABSE...
    The following error has occurred:
    ORA-01578: ORACLE data block corrupted (file # 3, block # 3236947)
    ORA-01110: data file 3: '/bkp/oradata/orcl_raw_cadata01'
    ORA-26040: Data block was loaded using the NOLOGGING option
    I have checked in the Primary database, that there are some object which are not being logged into the redo logfiles.....
    SQL> select table_name,INDEX_NAME,logging from dba_indexes where logging='NO'
    TABLE_NAME INDEX_NAME LOG
    MENU_MENUS NUX_MENU_MENUS_01 NO
    MENU_USER_MENUS MENU_USER_MENUS_X NO
    OM_CITY IDM_OM_CITY_CITY_NAME NO
    OM_EMPLOYER                    EMPLR_CODE_PK                  NO
    OM_EMPLOYER                    IDM_EMPLR_EMPLR_NAME           NOOM_STUDENT_HEAD OM_STUDENT_HEAD_HEAD_UK01 NO
    OT_DAK_ENTRY_DETL DED_SYS_ID_PK NO
    OT_DAK_ENTRY_HEAD DEH_SYS_ID_PK NO
    OT_DAK_ENTRY_HEAD IDM_DEH_DT_APPL_REGION NO
    OT_DAK_ENTRY_HEAD IDM_DEH_REGION_CODE NO
    OT_DAK_REFUNDS_DETL DRD_SYS_ID_PK NO
    TABLE_NAME INDEX_NAME LOG
    OT_MEM_FEE_COL_DETL IDM_MFCD_MFCH_SYS_ID NO
    OM_STUDENT_HEAD IDM_STUD_COURSE NO
    13 rows selected.
    so the main problem is in the OM_EMPOYER tables if i would delete the indexes from that table recreate it again with the logging clause,and then apply the archvied logs to the DRSITE.WILL THE problem will resolve.
    Pls suggest me...

    Hi..
    Firstly how did you confirm that it was that index only.Can you post the output of
    SELECT tablespace_name, segment_type, owner, segment_name
    FROM dba_extents WHERE file_id = 3 and 3236947 between block_id
    AND block_id + blocks - 1;
    This query can take time, if are sure that its the index don't fire this command .
    Secondly, when you will drop and recreate the index, it will be logged into the redo logfile.This information will be be logged in to an the archivelog file as its the replica of the redo logfile. Then when you apply this archive log maually, it will drop that index and then recreate it using the same sql.
    HTH
    Anand

  • RMAN problem with block corruption

    Hi
    I have problem with the block corruption in one of the database .
    here is the error message .
    ora-01578:oracle data block corrupted (file# 10,block # 55309) ora-01110: data file 10:
    '/db/gist1/data/gist1_gis_nologging_01.dbf' ora-26040: data block was loaded using the NOLOGGING option .
    gisq SQL> select * from v$database_block_corruption;
    FILE# BLOCK# BLOCKS CORRUPTION_CHANGE# CORRUPTIO
    10 11 126 3754364971 LOGICAL
    RMAN> blockrecover datafile 10 block 11;
    Starting blockrecover at 14/DEC/2012 16:25:48
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of blockrecover command at 12/14/2012 16:25:48
    RMAN-05009: Block Media Recovery requires Enterprise Edition
    Could some one help me in providing solution for this . we we have standard addition only .
    Thanks in advance ...

    It appears that there was a NOLOGGING operation on an object that resides in '/db/gist1/data/gist1_gis_nologging_01.dbf' .
    NOLOGGING operations, as the name suggests, do generate limited redo log, which makes the objects affected by them non-recoverable.
    RMAN Blockrecover, as far as I understand, uses full and archivelog backup to perform the block recovery. Since the archivelog backup does not store any changes related to the NOLOGGING operation, then Blockrecover would not be able to help you even if you were licensed.
    You can try to restore the object as of the most recent full backup…
    Iordan Iotzov
    http://iiotzov.wordpress.com/

  • Impact on import if there is a block corruption error in exported dump file

    Hi All
    I got an exported file(exp utility) from production database and in the log it is showing the error
    EXP-00056: ORACLE error 1578 encountered
    ORA-01578: ORACLE data block corrupted (file # 29, block # 387036)
    ORA-01110: data file 29: '+ORAFILES/prod/datafile/data.1750.715846723'
    ORA-26040: Data block was loaded using the NOLOGGING option
    There were two such errors. At the end of the export it is giving the message "Export terminated successfully with warnings"
    I want to if I do an import using imp will there be any issues with the import.
    will the import complete successfully.
    The database version is 10.2.0.2.0
    Regards,
    Samrat
    Edited by: Samrat Kumar on May 18, 2010 11:23 PM

    You may try the import and hope it works out, but you and your DBA should address the ORA-26040 error message. Identify the segments that relate to both errors you encountered (using file id and block number) and figure out the what you may want to do if those are not index segments. Here is a link to a similar issue:
    ORA-26040: Data block was loaded using the NOLOGGING option
    Good Luck

  • DB block corruption

    Hi All
    Is there any specific reason or what have possible to cause on the data block corruption in the oracle database.

    Block corruption is while the data is being written to the data blocks, if the write to the block fails abruptly, I mean that there is a partial write in the block, may be because of power disruption or I/O problem, leaving no time for header to be updated, or row data to be populated, oracle leaves the block corrupt.In case of block corruption you can normally use the database unless you try to read that particular block, against which it shoots up the block corruption error.Generally block corruption occurs if write fails on the block, when the transaction is being committed
    ORA-01578:
    ORACLE data block corrupted (file # string, block # string)
    Whenever we encounter above error message mean we have BLOCK CORRUPTION.
    We can find detail information about block corruption in alert.log file
    Two types of block corruption can happens
    - Physical corruption (media corrupt)
    - Logical corruption (soft corrupt)
    Physical corruption can be caused by defected memory boards, controllers or broken sectors on a hard disk;
    Logical corruption can among other reasons be caused by an attempt to recover through a NOLOGGING action.

  • Oracle 11g: Block Corruption in SYSAUX File

    Hello All,
    I am facing Data corruption issue in the SYSAUX file.
    We are using Oracle 11G (Microsoft 32 bit) and our system is running in noarchivelog mode.
    Following are the errors in the alert log.
    e:\sc\sc15.2\databases\oracleconfig\diag\rdbms\enmscsdb\nm45\trace\nm45_p000_5944.trc
    Corrupt block relative dba: 0x0088a9f8 (file 2, block 567800)
    Fractured block found during buffer read
    Data in bad block:
    type: 6 format: 2 rdba: 0x0088a9f8
    last change scn: 0x0000.0b3bb7c7 seq: 0x1 flg: 0x04
    spare1: 0x0 spare2: 0x0 spare3: 0x0
    consistency value in tail: 0xc7000601
    check value in block header: 0xee6b
    computed block checksum: 0x72c6
    Reread of rdba: 0x0088a9f8 (file 2, block 567800) found same corrupted data
    Thu Jan 22 16:46:44 2009
    SMON: Restarting fast_start parallel rollback
    SMON: ignoring slave err,downgrading to serial rollback
    ORACLE Instance nm45 (pid = 12) - Error 1578 encountered while recovering transaction (9, 11) on object 458.
    Errors in file e:\sc\sc15.2\databases\oracleconfig\diag\rdbms\enmscsdb\nm45\trace\nm45_smon_6492.trc:
    ORA-01578: ORACLE data block corrupted (file # 2, block # 567800)
    ORA-01110: data file 2: 'E:\SC\SC15.2\DATABASES\ORACLECONFIG\SYSAUXNM45.ORA'
    Thu Jan 22 16:46:45 2009
    Trace dumping is performing id=[cdmp_20090122164645]
    Corrupt Block Found
    TSN = 1, TSNAME = SYSAUX
    RFN = 2, BLK = 567800, RDBA = 8956408
    OBJN = 458, OBJD = 458, OBJECT = I_WRI$_OPTSTAT_HH_OBJ_ICOL_ST, SUBOBJECT =
    SEGMENT OWNER = SYS, SEGMENT TYPE = Index Segment
    Following query indicates the corruption is in index.
    SQL> SELECT tablespace_name, segment_type, owner, segment_name FROM dba_extents
    WHERE file_id = 2 and 567800 between block_id AND block_id + blocks - 1;
    TABLESPACE_NAME SEGMENT_TYPE OWNER
    SEGMENT_NAME
    SYSAUX INDEX SYS
    I_WRI$_OPTSTAT_HH_OBJ_ICOL_ST
    ==============
    DBverify output:
    ==============
    E:\SC\SC15.2\Databases\OracleConfig>dbv file=SYSAUXNM45.ORA blocksize=8192
    DBVERIFY: Release 11.1.0.7.0 - Production on Thu Jan 22 16:59:11 2009
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    DBVERIFY - Verification starting : FILE = E:\SC\SC15.2\Databases\OracleConfig/SY
    SAUXNM45.ORA
    DBV-00200: Block, DBA 8956312, already marked corrupt
    Page 567800 is influx - most likely media corrupt
    Corrupt block relative dba: 0x0088a9f8 (file 2, block 567800)
    Fractured block found during dbv:
    Data in bad block:
    type: 6 format: 2 rdba: 0x0088a9f8
    last change scn: 0x0000.0b3bb7c7 seq: 0x1 flg: 0x04
    spare1: 0x0 spare2: 0x0 spare3: 0x0
    consistency value in tail: 0xc7000601
    check value in block header: 0xee6b
    computed block checksum: 0x72c6
    DBVERIFY - Verification complete
    Total Pages Examined : 1623864
    Total Pages Processed (Data) : 540984
    Total Pages Failing (Data) : 0
    Total Pages Processed (Index): 964944
    Total Pages Failing (Index): 0
    Total Pages Processed (Other): 17849
    Total Pages Processed (Seg) : 0
    Total Pages Failing (Seg) : 0
    Total Pages Empty : 100086
    Total Pages Marked Corrupt : 2
    Total Pages Influx : 1
    Total Pages Encrypted : 0
    Highest block SCN : 190789648 (0.190789648)
    SQL> select * from v$database_block_corruption;
    FILE# BLOCK# BLOCKS CORRUPTION_CHANGE# CORRUPTIO
    2 567800 1 0 FRACTURED
    2 567704 1 0 FRACTURED
    How to resolve this issue.
    Thanks
    With Regards
    Hemant Joshi.

    Drop and re-creating the index would be better than re-building the index.
    Check the metalink note: Identify the corruption extension using RMAN/DBV/ANALYZE etc - 836658.1
    Note 28814.1 - Handling Oracle Block Corruptions in Oracle7/8/8i/9i/10g
    Note 472231.1 - How to identify all the Corrupted Objects in the Database reported by RMAN
    ORA-1578 Main Reference Index for Solutions -830997.1

  • Need advice on ORA-01578: ORACLE data block corrupted

    We have a development database server version- 10.2.0.3 with materialized views refresh as complete every morning. Yesterday we had a power failure and the server went down and database was shutdown unexpectedly.
    When we restarted the database after the server restarted, we found some of the datablocks got corrupted . Following were the exceptions that we saw in the alert.log.
    Errors in file /i01_01/app/oracle/product/10.2.0/db_1/admin/orcl9/bdump/orcl9_smon_7547.trc:
    ORA-01578: ORACLE data block corrupted (file # 11, block # 257712)
    ORA-01110: data file 11: '/i01_01/app/oracle/product/10.2.0/oradata/orcl9/ts_gen_data_02.dbf'
    ORACLE Instance orcl9 (pid = 8) - Error 1578 encountered while recovering transaction (9, 38) on object 54463
    I tried the following query to see the segment type.
    select owner, segment_name, segment_type from dba_extents where file_id =11 and 257712 between block_id and block_id + blocks - 1;
    OWNER
    SEGMENT_NAME
    SEGMENT_TYPE
    VISH
    INVENTORY_TXN
    TABLE
    where " INVENTORY_TXN " is a materialized view that was using the block that got corrupted. I can always recreate the MV by dropping and recreating it. Will it solve the problem???
    If not, how can I recover/repair the block.???
    Can anyone advice on this. Thanks very much in advance.

    To recover a corrupted block,the best way out is to use Blockrecover command of RMAN. So you would need RmAN backup to perform the operation.But first ypu you need to ensure that this is a persistent error or not? Is this error is coming repeatedly or just once it happened?
    About Blockrecover command,read here,
    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmrecov005.htm#BRADV157
    HTH
    Aman....

  • BLOCK CORRUPTION (ORA-1578) 처리 (ORACLE 8I NEW FEATURE)

    제품 : ORACLE SERVER
    작성날짜 : 2002-05-31
    BLOCK CORRUPTION (ORA-1578) 처리 (ORACLE 8I NEW FEATURE)
    ========================================================
    PURPOSE
    Block Corruption의 처리 방안에 대해 알아본다.
    Problem Description
    block corruption 시 10210, 10211,10231 의 event 를 사용해서
    해당 block 을 skip 할 수도 있지만 V8.1 이상에서는
    dbms_repair.fix_corrupt_blocks ,
    dbms_repair.skip_corrupt_block 를 이용하여
    corrupt가 발생한 block을 detect하고 skip, 또는 repair해주는 방안이
    제시되고 있다.
    Workaround
    Solution Description
    - 먼저 detecting 을 위해 db_block_checking =true 를 init.ora 에 set
    - dbms_repair 의 package 를 사용하는데 이 package 는 dbmsrpr.sql,
    prvtrpr.plb를 수행한다 .
    - sys 로 접속하여 package 를 실행한다.
    다음의 예제를 살펴보자
    T1 테이블에 corrupt 된 block 이 있다고 가정한다.
    SQL> desc t1
    Name Null? Type
    COL1 NOT NULL NUMBER(38)
    COL2 CHAR(512)
    SQL> analyze table t1 validate structure;
    analyze table t1 validate structure
    ERROR at line 1:
    ORA-01498: block check failure - see trace file
    이때 ANALYZE로 부터 발생된 trace file 에 corrupt 된 block 에 3 row 의
    (nrows = 3) data 가 있음을 알수 있다고 가정하자.
    DBMS_REPAIR.ADMIN_TABLES (repair and orphan key)
    ================================================
    ADMIN_TABLES 은 table 을 위한 repair table과,인덱스를 위한 orphan key
    tables을 제공한다.
    SQL> @adminCreate
    SQL> connect sys/change_on_install
    Connected.
    SQL>
    SQL> -- Repair Table
    SQL>
    SQL> declare
    2 begin
    3 -- Create repair table
    4 dbms_repair.admin_tables (
    5 -- table_name => 'REPAIR_TABLE',
    6 table_type => dbms_repair.repair_table,
    7 action => dbms_repair.create_action,
    8 tablespace => 'USERS'); -- default TS of SYS if not specified
    9 end;
    10 /
    PL/SQL procedure successfully completed.
    SQL> select owner, object_name, object_type
    2 from dba_objects
    3 where object_name like '%REPAIR_TABLE';
    OWNER OBJECT_NAME OBJECT_TYPE
    SYS DBA_REPAIR_TABLE VIEW
    SYS REPAIR_TABLE TABLE
    SQL>
    SQL> -- Orphan Key Table
    SQL>
    SQL> declare
    2 begin
    3 -- Create orphan key table
    4 dbms_repair.admin_tables (
    5 table_type => dbms_repair.orphan_table,
    6 action => dbms_repair.create_action,
    7 tablespace => 'USERS'); -- default TS of SYS if not specified
    8 end;
    9 /
    PL/SQL procedure successfully completed.
    SQL> select owner, object_name, object_type
    2 from dba_objects
    3 where object_name like '%ORPHAN_KEY_TABLE';
    OWNER OBJECT_NAME OBJECT_TYPE
    SYS DBA_ORPHAN_KEY_TABLE VIEW
    SYS ORPHAN_KEY_TABLE TABLE
    DBMS_REPAIR.CHECK_OBJECT
    =========================
    CHECK_OBJECT procedure 는 기술된 object를 check 하고, repair 를 위한 정보를 수집하기 위함이다.
    SQL> @checkObject
    SQL> set serveroutput on
    SQL>
    SQL> declare
    2 rpr_count int;
    3 begin
    4 rpr_count := 0;
    5 dbms_repair.check_object (
    6 schema_name => 'SYSTEM',
    7 object_name => 'T1',
    8 repair_table_name => 'REPAIR_TABLE',
    9 corrupt_count => rpr_count);
    10 dbms_output.put_line('repair count: ' || to_char(rpr_count));
    11 end;
    12 /
    repair count: 1
    PL/SQL procedure successfully completed.
    SQL> desc repair_table
    Name Null? Type
    OBJECT_ID NOT NULL NUMBER
    TABLESPACE_ID NOT NULL NUMBER
    RELATIVE_FILE_ID NOT NULL NUMBER
    BLOCK_ID NOT NULL NUMBER
    CORRUPT_TYPE NOT NULL NUMBER
    SCHEMA_NAME NOT NULL VARCHAR2(30)
    OBJECT_NAME NOT NULL VARCHAR2(30)
    BASEOBJECT_NAME VARCHAR2(30)
    PARTITION_NAME VARCHAR2(30)
    CORRUPT_DESCRIPTION VARCHAR2(2000)
    REPAIR_DESCRIPTION VARCHAR2(200)
    MARKED_CORRUPT NOT NULL VARCHAR2(10)
    CHECK_TIMESTAMP NOT NULL DATE
    FIX_TIMESTAMP DATE
    REFORMAT_TIMESTAMP DATE
    SQL> select object_name, block_id, corrupt_type, marked_corrupt,
    2 corrupt_description, repair_description
    3 from repair_table;
    OBJECT_NAME BLOCK_ID CORRUPT_TYPE MARKED_COR
    CORRUPT_DESCRIPTION
    REPAIR_DESCRIPTION
    T1 3 1 FALSE
    kdbchk: row locked by non-existent transaction
    table=0 slot=0
    lockid=32 ktbbhitc=1
    mark block software corrupt
    Data Extraction
    ===============
    repair table에 의하면 file 6 ,block 3 에 corrupt 이 났음을 알수 있다
    그러나 아직 이 block 은 corrupt 로 mark 되어 있지 않으므로 필요 data 를
    추출하여야 한다.
    1. ALTER SYSTEM DUMP (nrows = 3) 에 의해 block안에 있는 row수를 결정한다.
    2. corrupt object를 select 하여 가능한 정보를 추출한다.
    SQL> -- The following query can be used to salvage data from a corrupt block.
    SQL> -- Creating a temporary table facilitates data insertion.
    SQL> create table temp_t1 as
    2 select * from system.t1
    3 where dbms_rowid.rowid_block_number(rowid) = 3
    4 and dbms_rowid.rowid_to_absolute_fno (rowid, 'SYSTEM','T1') = 6;
    Table created.
    SQL> select col1 from temp_t1;
    COL1
    2
    3
    DBMS_REPAIR.FIX_CORRUPT_BLOCKS (ORA-1578)
    ============================================
    FIX_CORRUPT_BLOCKS procedure는 repair table 의 정보를 이용하여 corrupt
    blocks 을 fix 한다
    그러나 아직 full table scan 시 여전히 error 가 발생한다
    SQL> declare
    2 fix_count int;
    3 begin
    4 fix_count := 0;
    5 dbms_repair.fix_corrupt_blocks (
    6 schema_name => 'SYSTEM',
    7 object_name => 'T1',
    8 object_type => dbms_repair.table_object,
    9 repair_table_name => 'REPAIR_TABLE',
    10 fix_count => fix_count);
    11 dbms_output.put_line('fix count: ' || to_char(fix_count));
    12 end;
    13 /
    fix count: 1
    PL/SQL procedure successfully completed.
    SQL> select object_name, block_id, marked_corrupt
    2 from repair_table;
    OBJECT_NAME BLOCK_ID MARKED_COR
    T1 3 TRUE
    SQL> select * from system.t1;
    select * from system.t1
    ERROR at line 1:
    ORA-01578: ORACLE data block corrupted (file # 6, block # 3)
    ORA-01110: data file 6: '/tmp/ts_corrupt.dbf'
    DBMS_REPAIR.DUMP_ORPHAN_KEYS
    ==============================
    DUMP_ORPHAN_KEYS는 corrupt data 에 해당하는 index 를 나타내 준다
    SQL> select index_name from dba_indexes
    2 where table_name in (select distinct object_name from repair_table);
    INDEX_NAME
    T1_PK
    SQL> @dumpOrphanKeys
    SQL> set serveroutput on
    SQL>
    SQL> declare
    2 key_count int;
    3 begin
    4 key_count := 0;
    5 dbms_repair.dump_orphan_keys (
    6 schema_name => 'SYSTEM',
    7 object_name => 'T1_PK',
    8 object_type => dbms_repair.index_object,
    9 repair_table_name => 'REPAIR_TABLE',
    10 orphan_table_name => 'ORPHAN_KEY_TABLE',
    11 key_count => key_count);
    12 dbms_output.put_line('orphan key count: ' || to_char(key_count));
    13 end;
    14 /
    orphan key count: 3
    PL/SQL procedure successfully completed.
    SQL> desc orphan_key_table
    Name Null? Type
    SCHEMA_NAME NOT NULL VARCHAR2(30)
    INDEX_NAME NOT NULL VARCHAR2(30)
    IPART_NAME VARCHAR2(30)
    INDEX_ID NOT NULL NUMBER
    TABLE_NAME NOT NULL VARCHAR2(30)
    PART_NAME VARCHAR2(30)
    TABLE_ID NOT NULL NUMBER
    KEYROWID NOT NULL ROWID
    KEY NOT NULL ROWID
    DUMP_TIMESTAMP NOT NULL DATE
    SQL> select index_name, count(*) from orphan_key_table
    2 group by index_name;
    INDEX_NAME COUNT(*)
    T1_PK 3
    Note: orphan key table의 index 는 다시 rebuild 되어야 한다.
    DBMS_REPAIR.SKIP_CORRUPT_BLOCKS
    ===============================
    SKIP_CORRUPT_BLOCKS 은 table 과 index 의 corrupt block 을 skip 하는 것을 enable/disable 을 실시한다.
    Suggestion: SKIP_CORRUPT_BLOCKS 가 enabled되면 orphan key table의 모든
    index 는 모두 rebuild 되어야 한다. ( all index associated with object
    if DUMP_ORPHAN_KEYS was omitted).
    SQL> @skipCorruptBlocks
    SQL> declare
    2 begin
    3 dbms_repair.skip_corrupt_blocks (
    4 schema_name => 'SYSTEM',
    5 object_name => 'T1',
    6 object_type => dbms_repair.table_object,
    7 flags => dbms_repair.skip_flag);
    8 end;
    9 /
    PL/SQL procedure successfully completed.
    SQL> select table_name, skip_corrupt from dba_tables
    2 where table_name = 'T1';
    TABLE_NAME SKIP_COR
    T1 ENABLED
    SQL> -- rows in corrupt block skipped, no errors on full table scan
    SQL> select * from system.t1;
    COL1 COL2
    4 dddd
    5 eeee
    --> Notice the pk index has not yet been corrected.
    SQL> insert into system.t1 values (1,'aaaa');
    insert into system.t1 values (1,'aaaa')
    SQL> select * from system.t1 where col1 = 1;
    no rows selected
    DBMS_REPAIR.REBUILD_FREELISTS
    ===============================
    REBUILD_FREELISTS rebuilds freelists for the specified object.
    SQL> declare
    2 begin
    3 dbms_repair.rebuild_freelists (
    4 schema_name => 'SYSTEM',
    5 object_name => 'T1',
    6 object_type => dbms_repair.table_object);
    7 end;
    8 /
    PL/SQL procedure successfully completed.
    Rebuild Index
    =============
    Note: Every index identified in the orphan key table should be rebuilt to
    ensure consistent results.
    SQL> alter index system.t1_pk rebuild online;
    Index altered.
    SQL> insert into system.t1 values (1, 'aaaa');
    1 row created.
    SQL> select * from system.t1;
    COL1 COL2
    4 dddd
    5 eeee
    1 aaaa
    Reference Document
    ------------------

    Try look to alert<SID>.log file for full error report (you could paste it here).
    Also from alert log you could get real values for db_block_buffers and shared_pool_size parameters that used during instance startup.

  • Diff between logical and physical block corruption

    What is the difference between Physical and Logical block corruption.
    Dbverify utility, analyze command is used to check the logical block corruption not the physical one am i correct??
    When i get
    ORA-01578: ORACLE data block corrupted (file # 9, block # 13)
    ORA-01110: data file 9: '/oracle/dbs/tbs_91.f'
    ORA-01578: ORACLE data block corrupted (file # 2, block # 19)
    ORA-01110: data file 2: '/oracle/dbs/tbs_21.f'
    How to conform that this a logical or physical block corruption???
    please through some light regarding this....
    kumaresh

    the following link may help u
    http://download-east.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmconc1012.htm

  • System datafile block corruption - no backups and database in NOARCHIVELOG mode

    Dear All,
    Database version - oracle 11.1 Enterprise
    OS - RHELinux 5.8
    What are the options of recovering from physical block corruption when there are no backup available to perform block media recovery?
    V$DATABASE_BLOCK_CORRUPTION reports two segments corrupted (please see attached image for details).
    1 table in system datafile - sys_fba_barrierscn
    1 index - (applicaiton index)
    What are my options?
    I know there is a possibility that the database will not restart after a shutdown due to corruption in system tablespace.
    Database is in noarchivelog mode. So online backups are not possible and there aren't any full backups either.
    I am thinking of below,
    1. Run dbms_repair with fix_block_corruption. - Still database startup might fail?
    2. Shutdown the database and take offline full backup with RMAN MAXCorrupt option.
    Appreciate your suggestions and advises.
    Thanks
    Stefan

    Thanks Sybrand,
    Agree with your first two suggestions .
    Also scheduled a expdp job tonight. (Only backup like thing they had was a expdp cron, but until today all the large tables were failing due to small undo_retention).
    Yes. Flashback is not used. So hopefully it will not affect the a database restart i guess?
    Related to dbms_repair, I was referring to - http://askdba.org/weblog/2010/08/physical-corruption-ora-1578-part-3/.
    Where DBMS_REPAIR.FIX_CORRUPT_BLOCKS and DBMS_REPAIR.SKIP_CORRUPT_BLOCKS used.
    Which i think will not use any redo.
    Thanks
    Stefan

  • Oracle 11g - How to repair block corruption(on free space) in datafile

    Hi,
    I have a tablesopace with 3 datafiles, out of which one datafile has corrupted block. But no objects or data is affected as the corrupted block os in free space. This was shown in the alert logs.
    Please see below the details:
    Wed Apr 06 15:30:04 2011
    SMON: Restarting fast_start parallel rollback
    SMON: ignoring slave err,downgrading to serial rollback
    ORACLE Instance geooap (pid = 12) - Error 1578 encountered while recovering transaction (10, 6) on object 149755.
    Errors in file f:\oracle11g\diag\rdbms\geooap\geooap\trace\geooap_smon_5540.trc:
    ORA-01578: ORACLE data block corrupted (file # 7, block # 54053)
    ORA-01110: data file 7: 'F:\ORACLE11G\ORADATA\GEOOAP\ORDER_DATA_01.DBF'
    GEOAP:
    Fri Apr 01 14:57:48 2011
    Errors in file f:\oracle11g\diag\rdbms\geop\geop\trace\geop_arc1_2156.trc:
    ORA-00235: control file read without a lock inconsistent due to concurrent update
    Fri Apr 01 14:57:58 2011
    ================================================================
    The corruption is being reported in a free space block of the ORDER_DATA_01.DBF.
    I’ve checked all the tables (and indexes) in this tablespace and none report corruption.
    =====================================================Is there any action I need to take to remove corruption at this point?It is not affected any operation on the database yet.
    What is the best way to do get rid of the corrupt block, without dropping and rebuillding the full tablespace(which is around 6 GB -total of 3 datafiles)
    Thanks a lot

    Can RMAN recover the datablock from this cold backup(which is a week old, the data file was not corrupted then) ?Please note that to do the recovery, you would need the backup and the archivelog files since the backup. Think about what you are asking to do. Its a single block whose recovery you are asking from a week old backup which obviously would be on an much older SCN compared to the rest of the database. How would you make that block consistent with the rest of the datafile. If you don't have archivelog in that db whose block is corrupted, you may forget that block and any data that it might ever had. Also, please read the documentation about the block recovery which explains the requirements very clearly,
    http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmblock.htm#BRADV89784
    From the above link, 1st point,
    The target database must run in ARCHIVELOG mode and be open or mounted with a current control file.HTH
    Aman....

  • Data Block Corruption

    I'm on 9i R2 Patch 7 on a Microsoft Windows Server 2003.
    How do you fix data block corruption in a Table?
    Is the some way to retrieve the data from the Table drop it then recreate and reimport the data?
    or do you have to succumb with restoring the Database from the last known good backup?

    Hey, you can do the BMR (Block Media Recovery).
    Since block corruption is to few subsets of blocks, i.e. a single table, you dont need to restore from the previous valid backup, you can simply do the following to achieve BMR.
    Connect to rman and run the following:
    run{ backup validate database};
    Once the above commend is finishes, exit from RMAN and connect to the database as / as sysdba and use the following view to know the details required for BMR.
    select * from V$backup_corruption;
    The above queries gives you file# and block# information. Once you have the information do the BMR using following command at the RMAN prompt:
    run {blockrecover datafile # block #};
    # : indicated the datafile number and block number from the above view.
    Let me know if you have any further issues.
    You can also use view V$DATABASE_BLOCK_CORRUPTION to view the file# and corrupted blocks information.
    Jaffar

Maybe you are looking for

  • S_TCODE object is not coming in role after adding profile of another role.

    Dear Gurus, I have added profile of a existed role to a newly created role in pfcg (edit->insert authorisation-> from profile), but I can't see the S_TCODE object of that role of the added profile. For some roles, it appears, but for some, it don't c

  • Questions on the Wireless Installation.

    Experts, We have a good number of wireless access point installed on our network and I want to make sure that these AP's are not conflicting with each other. Why do all the wireless access points show me the channel as 1(for 2.4 GHz)? and channel 36(

  • Macbook won't recognize external Hard Drive and issues with Time Machine

    Hello everyone, I have just bought a new Macbook Pro with Mountain Lion and I am currently having problems with Time Machine. The issue begun in Snow Leopard: Time Machine was taking too long to backup, and would often not finish the backup because t

  • IPod iMessage Doesn't Work Properly

    I have a fourth generation iPod Touch and I use iMessage so that my iPod Touch and iPhone people can text me (without using service like Google Voice etc.). Since this is an iPod Touch, not an iPhone, iMessage connects via email address, not phone nu

  • Why does iCloud say I have no storage?

    iCloud says I have no storage