Block on Datafiles

As we know datafiles may contains both committed and uncommitted block. My question is when then uncommitted block in datafile is updated with the committed block.

user13549752 wrote:
As we know datafiles may contains both committed and uncommitted block. My question is when then uncommitted block in datafile is updated with the committed block.after COMMIT is issued
Handle:     user13549752
Status Level:     Newbie (5)
Registered:     Jan 26, 2011
Total Posts:     139
Total Questions:     76 (39 unresolved)
why so many unanswered questions?

Similar Messages

  • Header block in datafile

    How to get header block in oracle datafile?
    Which oracle view will be helpful?

    To corrupt a block in datafile use the " dd " command,
    dd if=/dev/zero of=/oracle/oradata/ORCL/datafile/test.dbf bs=8k conv=notrunc seek=10 count=1
    How to corrupt an Oracle 10g Database to test repair
    Thanks

  • SCN in blocks and datafile headers

    When CKPT updates datafiles headers with the new SCN is it also updates the datafiles blocks with the new SCN ?
    Thank you,
    Micheal.

    imran khan wrote:
    The SCN are not stored the datafile blocks in fact it stores the SCNs in terms of bitmaps..Cheers!An absolutely wrong statement! How you think that the transaction within a block would come to know that its committed or not if there is no SCN stored in the block?
    See below the dump of a block and also the SCN info recorded in it,
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select header_file, header_block from dba_segments where segment_name='EMP'
      2  ;
    HEADER_FILE HEADER_BLOCK
              4          234
    SQL> select blocks from dba_segments where segment_name='EMP' and owner='SCOTT';
        BLOCKS
             8
    SQL> alter session set tracefile_identifier=myblockd;
    Session altered.
    SQL> alter system dump datafile 4 block 235;
    System altered.
    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Windows XP Version V5.1 Service Pack 2
    CPU                 : 2 - type 586
    Process Affinity    : 0x0x00000000
    Memory (Avail/Total): Ph:437M/2045M, Ph+PgF:1335M/3428M, VA:1663M/2047M
    Instance name: orcl
    Redo thread mounted by this instance: 1
    Oracle process number: 30
    Windows thread id: 4596, image: ORACLE.EXE (SHAD)
    *** 2011-08-21 17:40:49.781
    *** SESSION ID:(16.6) 2011-08-21 17:40:49.781
    *** CLIENT ID:() 2011-08-21 17:40:49.781
    *** SERVICE NAME:(SYS$USERS) 2011-08-21 17:40:49.781
    *** MODULE NAME:(sqlplus.exe) 2011-08-21 17:40:49.781
    *** ACTION NAME:() 2011-08-21 17:40:49.781
    Start dump data blocks tsn: 4 file#:4 minblk 235 maxblk 235
    Block dump from cache:
    Dump of buffer cache at level 4 for tsn=4, rdba=16777451
    Block dump from disk:
    buffer tsn: 4 rdba: 0x010000eb (4/235)
    scn: 0x0000.002c106e seq: 0x05 flg: 0x04 tail: 0x106e0605
    frmt: 0x02 chkval: 0xed5f type: 0x06=trans data
    Hex dump of block: st=0, typ_found=1There is for sure, a block level SCN that oracle maintains .
    Aman....

  • Corrupted blocks does not belong to any object

    hi gurus
    In the alert.log I can see a lot of ORA-01578 errors says that there is a corruped block at datafile 10 block 8,but I not able to find any objects releated to datafile 10 block 8, how could I solve this problem because it keeps occuring in the alert.log. Thanks for your time!

    hi rp0428
    I digged into the tracefile no useful information could be found!
    BTW I found this:
    **** 2012-01-21 15:45:18.439*
    ----- Current SQL Statement for this session (sql_id=bfp4j56cgnu1r) -----
    create table hj_tmp_1111 as select from zwxt.operator_zj*
    ----- Call Stack Trace -----
    calling              call     entry                argument values in hex
    location             type     point                (? means dubious value)
    skdstdst()+41        call     kgdsdst()            000000000 ? 000000001 ?
    *7FFFF021C328 ? 7FFFF021AE10 ?*
    *000000000 ? 000000002 ?*
    ksedst1()+103        call     skdstdst()           000000000 ? 000000001 ?
    *7FFFF021C328 ? 7FFFF021AE10 ?*
    *000000001 ? 000000002 ?*
    ksedst()+39          call     ksedst1()            000000000 ? 000000001 ?
    *7FFFF021C328 ? 7FFFF021AE10 ?*
    *000000001 ? 000000002 ?*
    dbkedDefDump()+1076  call     ksedst()             000000000 ? 000000001 ?
    *7FFFF021C328 ? 7FFFF021AE10 ?*
    Edited by: user2964285 on 2012-2-8 下午11:23

  • Block corruption - cant restore from backup

    Hi,
    we have development database 11.2.0.1. There was problem with storage, and as a result there are two corrupted blocks in data files.
    SQL> select * from V$DATABASE_BLOCK_CORRUPTION;
    FILE# BLOCK# BLOCKS CORRUPTION_CHANGE# CORRUPTIO
    6 2359942 1 0 FRACTURED
    25 1855622 1 0 FRACTURED
    I have scheduled weekly full backup and daily incremental backup using EM so now I want to use rman to perform media recovery on corrupted blocks. However rman says there is no backup for affected data files (see below)
    RMAN> RECOVER CORRUPTION LIST;
    Starting recover at 03-NOV-12
    using channel ORA_DISK_1
    using channel ORA_DISK_2
    using channel ORA_DISK_3
    using channel ORA_DISK_4
    using channel ORA_DISK_5
    channel ORA_DISK_1: restoring block(s)
    channel ORA_DISK_1: specifying block(s) to restore from backup set
    restoring blocks of datafile 00006
    channel ORA_DISK_1: reading from backup piece /opt/oraBackup/rman/i2npb3o9_1_1
    channel ORA_DISK_1: piece handle=/opt/oraBackup/rman/i2npb3o9_1_1 tag=BACKUP_FULL_110212103009
    channel ORA_DISK_1: restored block(s) from backup piece 1
    channel ORA_DISK_1: block restore complete, elapsed time: 00:42:35
    channel ORA_DISK_1: restoring block(s)
    channel ORA_DISK_1: specifying block(s) to restore from backup set
    restoring blocks of datafile 00025
    channel ORA_DISK_1: reading from backup piece /opt/oraBackup/rman/i9npbd5e_1_1
    channel ORA_DISK_1: piece handle=/opt/oraBackup/rman/i9npbd5e_1_1 tag=BACKUP_FULL_110212103009
    channel ORA_DISK_1: restored block(s) from backup piece 1
    channel ORA_DISK_1: block restore complete, elapsed time: 00:16:35
    failover to previous backup
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 11/03/2012 11:59:29
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 25 found to restore
    RMAN-06023: no backup or copy of datafile 6 found to restore
    I dont understand this, because the backups are performed weekly and daily and all files are at their proper location. When I check the EM backup reports, I see COMPLETED for every weekly and daily backup.
    Anyone please could suggest how to repair the blocks from backups ?

    Hi people, I am back to this issue. I have found this in the database
    SQL> select * from v$backup_corruption;
         RECID      STAMP  SET_STAMP  SET_COUNT     PIECE#      FILE#     BLOCK#     BLOCKS CORRUPTION_CHANGE# MAR CORRUPTIO
             1  796949262  796948233       9293          1          6    2359942          1                  0 NO  CORRUPT
             2  796953328  796949174       9300          1         25    1855622          1                  0 NO  CORRUPT
             3  797035604  797034635       9318          1          6    2359942          1                  0 NO  CORRUPT
             4  797039692  797035556       9325          1         25    1855622          1                  0 NO  CORRUPT
             5  797134390  797121030       9343          1          6    2359942          1                  0 NO  CORRUPT
             6  797137228  797134397       9368          1         25    1855622          1                  0 NO  CORRUPT
             7  797739951  797725854       9590          1          6    2359942          1                  0 NO  CORRUPT
             8  797744507  797739957       9597          1         25    1855622          1                  0 NO  CORRUPT
             9  798340269  798330633       9794          1          6    2359942          1                  0 NO  CORRUPT
            10  798343497  798340270       9801          1         25    1855622          1                  0 NO  CORRUPTSo the backup contains corrupted blocks. Right ? Older backups are already gone because of retention policy.
    I have set up the backup using Enterprise Manager - Schedule Backup.
    What I need to know is how to avoid taking backup with corrupted blocks in future. I need such backup to fail.
    Thank you for advices and regards.

  • ORA-01114: IO error writing block

    What is the best way to recover from error :
    Wed Nov 22 21:44:01 2006
    Errors in file c:\oracle\admin\orcl\bdump\orcl_dbw0_3932.trc:
    ORA-01242: data file suffered media failure: database in NOARCHIVELOG mode
    ORA-01114: IO error writing block to file 65 (block # 260237)
    ORA-01110: data file 65: 'C:\ORADATA\ORCL\RG_IDX_16.ORA'
    ORA-27072: skgfdisp: I/O error
    OSD-04008: WriteFile() failure, unable to write to file
    O/S-Error: (OS 1) Incorrect function.
    DBW0: terminating instance due to error 1242
    Instance terminated by DBW0, pid = 3932

    The basic meaning of this error stack is DB writer is unable to write to the mentioned datafile. There could be logical or physical corruption (hardware failure) or another process blocks this datafile. In the latter case the problem should be temporarily,
    1) shutdown the database
    2) run chkdsk (to check for disk failures)
    3) startup the database
    If the error persists you have to restore/recover from a backup. Since the database is running in noarchivelog mode this can only be done from a cold backup, which means probably loss of data.
    Werner

  • Block Corruption in SYSTEM Tablespace

    Hi,
    well it´s just a test database without a backup, but i would like to repair it anyway :-)
    Here are the facts:
    Errors in file c:\oracle\admin\o10g\bdump\o10g_smon_1404.trc:
    ORA-01578: ORACLE data block corrupted (file # 1, block # 50187)
    ORA-01110: data file 1: 'C:\ORACLE\ORADATA\O10G\SYSTEM01.DBF'
    1. I found the object: It´s a Cluster named SYS.C_TOID_VERSION#
    containing a lot of table stuff (type$,parameter$, ...)
    i tried to repair it with dbms_repair:
    BEGIN SYS.DBMS_REPAIR.SKIP_CORRUPT_BLOCKS (
    SCHEMA_NAME => 'SYS',
    OBJECT_NAME => 'C_TOID_VERSION#',
    OBJECT_TYPE => dbms_repair.cluster_object,
    FLAGS => dbms_repair.skip_flag);
    END;
    No error, but the same block corruption message in the alert.log 1 minute later.
    i can select the tables in the cluster.
    Has anyboby another trick to repair a cluster?
    Thanks
    Marco

    Hi,
    if you have rman backup then this problem become resolved by only one command.
    BLOCKRECOVER DATAFILE 1 BLOCK 3 DATAFILE 50187;
    otherwise restore system tablespace from backup and recover it.
    and one more thing
    **Don't fix the block in system tablespace it may create problem if that block contain some useful information of oracle(internal information).
    Thanks
    Kuljeet Pal Singh

  • Block recover in oracle 10g

    Hi all,
    db version - 10.2.0.4 ; OS version : RHEL 5.7
    There was a corruption in the block in undo datafile in one of our production database. I tried to recover the block using RMAN :
    RMAN> blockrecover datafile # block #;
    but what its doing is restoring all the archive logs to the archive destination. I have started the block recovery at 10:30am and its already 11:50pm but still its restoring all the archive logs. First it read the last FULL backup which was of date 02-July-2012 , Once it completed that it started restoring all the archived logs to the archive destination.
    I am really confused what I have to do know. I am thinking of stopping the restoration and then add a new datafile to the Undo tablespace and then remove the corrupted block undo datafile.
    Is my approach correct or Do I need to follow any other procedure to overcome the issue.
    Regards,
    Imran Khan

    I mean rman block recovery procedure. I am not deleting yet. I just wanna know which approach I have to take in order to resolve the issue.
    Regards,
    Imran Khan

  • Sysaux  Datafile was Corrupted

    hi , i m new to this forums...
    one of my Learning Instance sysaux Datafile was corrupted...
    how to recover it?
    is Point in time Recovery is Possible??

    Hi all,
    If are there no backup for sysaux?
    there is a corrupted block on datafile of sysaux.
    Because this, I cannot export, drop, anything.
    so, I´ve tried to use:
    run
       set newname for datafile 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\DEVDB\SYSAUX01.DBF'
       to 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\DEVDB\DATA\SYSAUX01.DBF';
       restore (tablespace sysaux);
       switch datafile 3;
       recover tablespace sysaux;
    }But with this I got the error:
    RMAN-06054: media recovery requesting unknown log: thread 1 seq 2874 lowscn 47185106
    So I´ve tried:
    BLOCKRECOVER DATAFILE 3 BLOCK 50139;But with this I got the error:
    RMAN-03002: failure of blockrecover command at 04/29/2008 16:04:30
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 3 found to restore
    Is there any other way to restore and recover this?
    I would like at least to export, but I got error too. :-(
    thanks!!!!
    Obs: I have backup for all database files, but when I did the backups,
    because this datafile is corrupted, I take the tablespace offline.

  • Data corrupt block

    os Sun 5.10 oracle version 10.2.0.2 RAC 2 node
    alert.log 내용
    Hex dump of (file 206, block 393208) in trace file /oracle/app/oracle/admin/DBPGIC/udump/dbpgic1_ora_1424.trc
    Corrupt block relative dba: 0x3385fff8 (file 206, block 393208)
    Bad header found during backing up datafile
    Data in bad block:
    type: 32 format: 0 rdba: 0x00000001
    last change scn: 0x0000.98b00394 seq: 0x0 flg: 0x00
    spare1: 0x1 spare2: 0x27 spare3: 0x2
    consistency value in tail: 0x00000001
    check value in block header: 0x0
    block checksum disabled
    Reread of blocknum=393208, file=/dev/md/vg_rac06/rdsk/d119. found same corrupt data
    Reread of blocknum=393208, file=/dev/md/vg_rac06/rdsk/d119. found same corrupt data
    Reread of blocknum=393208, file=/dev/md/vg_rac06/rdsk/d119. found same corrupt data
    Reread of blocknum=393208, file=/dev/md/vg_rac06/rdsk/d119. found same corrupt data
    Reread of blocknum=393208, file=/dev/md/vg_rac06/rdsk/d119. found same corrupt data
    corrupt 발생한 Block id 를 검색해 보면 Block id 가 검색이 안됩니다.
    dba_extents 로 검색
    corrupt 때문에 Block id 가 검색이 안되는 것인지 궁금합니다.
    export 받으면 데이타는 정상적으로 export 가능.

    다행이네요. block corruption 이 발생한 곳이 데이터가 저장된 블록이
    아닌 것 같습니다. 그것도 rman백업을 통해서 발견한 것 같는데
    맞는지요?
    scn이 scn: 0x0000.00000000 가 아닌
    0x0000.98b00394 인 것으로 봐서는 physical corrupt 가 아닌
    soft corrupt인 것 같습니다.
    그렇다면 버그일 가능성이 높아서 찾아보니
    Bug 4411228 - Block corruption with mixture of file system and RAW files
    의 버그가 발견되었습니다. 이것이 아닐 수도 있지만..
    이러한 block corruption에 대한 처리방법 및 원인분석은
    오라클(주)를 통해서 정식으로 요청하셔야 합니다.
    metalink를 통해서 SR 요청을 하십시오.
    export는 high water mark 이후의 block corruption을 찾아내지 못하고 이외에도
    아래 몇가지 경우에서도 찾아내지 못합니다.
    db verify( dbv)의 경우에는 physical corruption은 찾아내지 못하고
    soft block corruption만 찾아낼 수 있습니다.
    경험상 physical corruption 이 발생하였으나 /dev/null로
    datafile copy가 안되는데도 dbv로는 이 문제를 찾아내지
    못하였습니다.
    그렇다면 가장 좋은 방법은 rman 입니다. rman은 high water mark까지의
    데이터를 백업해주면서 전체 데이터파일에 대한 체크를 하기도 합니다.
    physical corruption뿐만 아니라 logical corruption도 체크를
    하니 점검하기로는 rman이 가장 좋은 방법이라 생각합니다.
    The Export Utility
    # Use a full export to check database consistency
    # Export performs a full scan for all tables
    # Export only reads:
    - User data below the high-water mark
    - Parts of the data dictionary, while looking up information concerning the objects being exported
    # Export does not detect the following:
    - Disk corruptions above the high-water mark
    - Index corruptions
    - Free or temporary extent corruptions
    - Column data corruption (like invalid date values)
    block corruption을 정상적으로 복구하는 방법은 restore 후에
    복구하는 방법이 있겠으나 이미 restore할 백업이 block corruption이
    발생했을 수도 있습니다. 그러므로 다른 서버에 restore해보고
    정상적인 datafile인 것을 확인 후에 실환경에 restore하는 것이 좋습니다.
    만약 백업본까지 block corruption이 발생하였거나 또는 시간적 여유가
    없을 경우에는 table을 move tablespace 또는 index rebuild를 통해서
    다른 테이블스페이스로 데이터를 옮겨두고 문제가 발생한 테이블스페이스를
    drop해버리고 재생성 하는 것이 좋을 것 같습니다.(지금 현재 데이터의
    손실은 없으니 move tablespace, rebuild index 방법이 좋겠습니다.
    Handling Corruptions
    Check the alert file and system log file
    Use diagnostic tools to determine the type of corruption
    Dump blocks to find out what is wrong
    Determine whether the error persists by running checks multiple times
    Recover data from the corrupted object if necessary
    Preferred resolution method: media recovery
    Handling Corruptions
    Always try to find out if the error is permanent. Run the analyze command multiple times or, if possible, perform a shutdown and a startup and try again to perform the operation that failed earlier.
    Find out whether there are more corruptions. If you encounter one, there may be other corrupted blocks, as well. Use tools like DBVERIFY for this.
    Before you try to salvage the data, perform a block dump as evidence to identify the actual cause of the corruption.
    Make a hex dump of the bad block, using UNIX dd and od -x.
    Consider performing a redo log dump to check all the changes that were made to the block so that you can discover when the corruption occurred.
    Note: Remember that when you have a block corruption, performing media recovery is the recommended process after the hardware is verified.
    Resolve any hardware issues:
    - Memory boards
    - Disk controllers
    - Disks
    Recover or restore data from the corrupt object if necessary
    Handling Corruptions (continued)
    There is no point in continuing to work if there are hardware failures. When you encounter hardware problems, the vendor should be contacted and the machine should be checked and fixed before continuing. A full hardware diagnostics should be run.
    Many types of hardware failures are possible:
    Bad I/O hardware or firmware
    Operating system I/O or caching problem
    Memory or paging problems
    Disk repair utilities
    아래 관련 자료를 드립니다.
    All About Data Blocks Corruption in Oracle
    Vijaya R. Dumpa
    Data Block Overview:
    Oracle allocates logical database space for all data in a database. The units of database space allocation are data blocks (also called logical blocks, Oracle blocks, or pages), extents, and segments. The next level of logical database space is an extent. An extent is a specific number of contiguous data blocks allocated for storing a specific type of information. The level of logical database storage above an extent is called a segment. The high water mark is the boundary between used and unused space in a segment.
    The header contains general block information, such as the block address and the type of segment (for example, data, index, or rollback).
    Table Directory, this portion of the data block contains information about the table having rows in this block.
    Row Directory, this portion of the data block contains information about the actual rows in the block (including addresses for each row piece in the row data area).
    Free space is allocated for insertion of new rows and for updates to rows that require additional space.
    Row data, this portion of the data block contains rows in this block.
    Analyze the Table structure to identify block corruption:
    By analyzing the table structure and its associated objects, you can perform a detailed check of data blocks to identify block corruption:
    SQL> analyze table_name/index_name/cluster_name ... validate structure cascade;
    Detecting data block corruption using the DBVERIFY Utility:
    DBVERIFY is an external command-line utility that performs a physical data structure integrity check on an offline database. It can be used against backup files and online files. Integrity checks are significantly faster if you run against an offline database.
    Restrictions:
    DBVERIFY checks are limited to cache-managed blocks. It’s only for use with datafiles, it will not work against control files or redo logs.
    The following example is sample output of verification for the data file system_ts_01.dbf. And its Start block is 9 and end block is 25. Blocksize parameter is required only if the file to be verified has a non-2kb block size. Logfile parameter specifies the file to which logging information should be written. The feedback parameter has been given the value 2 to display one dot on the screen for every 2 blocks processed.
    $ dbv file=system_ts_01.dbf start=9 end=25 blocksize=16384 logfile=dbvsys_ts.log feedback=2
    DBVERIFY: Release 8.1.7.3.0 - Production on Fri Sep 13 14:11:52 2002
    (c) Copyright 2000 Oracle Corporation. All rights reserved.
    Output:
    $ pg dbvsys_ts.log
    DBVERIFY: Release 8.1.7.3.0 - Production on Fri Sep 13 14:11:52 2002
    (c) Copyright 2000 Oracle Corporation. All rights reserved.
    DBVERIFY - Verification starting : FILE = system_ts_01.dbf
    DBVERIFY - Verification complete
    Total Pages Examined : 17
    Total Pages Processed (Data) : 10
    Total Pages Failing (Data) : 0
    Total Pages Processed (Index) : 2
    Total Pages Failing (Index) : 0
    Total Pages Processed (Other) : 5
    Total Pages Empty : 0
    Total Pages Marked Corrupt : 0
    Total Pages Influx : 0
    Detecting and reporting data block corruption using the DBMS_REPAIR package:
    Note: Note that this event can only be used if the block "wrapper" is marked corrupt.
    Eg: If the block reports ORA-1578.
    1. Create DBMS_REPAIR administration tables:
    To Create Repair tables, run the below package.
    SQL> EXEC DBMS_REPAIR.ADMIN_TABLES(‘REPAIR_ADMIN’, 1,1, ‘REPAIR_TS’);
    Note that table names prefix with ‘REPAIR_’ or ‘ORPAN_’. If the second variable is 1, it will create ‘REAIR_key tables, if it is 2, then it will create ‘ORPAN_key tables.
    If the thread variable is
    1 then package performs ‘create’ operations.
    2 then package performs ‘delete’ operations.
    3 then package performs ‘drop’ operations.
    2. Scanning a specific table or Index using the DBMS_REPAIR.CHECK_OBJECT procedure:
    In the following example we check the table employee for possible corruption’s that belongs to the schema TEST. Let’s assume that we have created our administration tables called REPAIR_ADMIN in schema SYS.
    To check the table block corruption use the following procedure:
    SQL> VARIABLE A NUMBER;
    SQL> EXEC DBMS_REPAIR.CHECK_OBJECT (‘TEST’,’EMP’, NULL,
    1,’REPAIR_ADMIN’, NULL, NULL, NULL, NULL,:A);
    SQL> PRINT A;
    To check which block is corrupted, check in the REPAIR_ADMIN table.
    SQL> SELECT * FROM REPAIR_ADMIN;
    3. Fixing corrupt block using the DBMS_REPAIR.FIX_CORRUPT_BLOCK procedure:
    SQL> VARIABLE A NUMBER;
    SQL> EXEC DBMS_REPAIR.FIX.CORRUPT_BLOCKS (‘TEST’,’EMP’, NULL,
    1,’REPARI_ADMIN’, NULL,:A);
    SQL> SELECT MARKED FROM REPAIR_ADMIN;
    If u select the EMP table now you still get the error ORA-1578.
    4. Skipping corrupt blocks using the DBMS_REPAIR. SKIP_CORRUPT_BLOCK procedure:
    SQL> EXEC DBMS_REPAIR. SKIP_CORRUPT.BLOCKS (‘TEST’, ‘EMP’, 1,1);
    Notice the verification of running the DBMS_REPAIR tool. You have lost some of data. One main advantage of this tool is that you can retrieve the data past the corrupted block. However we have lost some data in the table.
    5. This procedure is useful in identifying orphan keys in indexes that are pointing to corrupt rows of the table:
    SQL> EXEC DBMS_REPAIR. DUMP ORPHAN_KEYS (‘TEST’,’IDX_EMP’, NULL,
    2, ‘REPAIR_ADMIN’, ‘ORPHAN_ADMIN’, NULL,:A);
    If u see any records in ORPHAN_ADMIN table you have to drop and re-create the index to avoid any inconsistencies in your queries.
    6. The last thing you need to do while using the DBMS_REPAIR package is to run the DBMS_REPAIR.REBUILD_FREELISTS procedure to reinitialize the free list details in the data dictionary views.
    SQL> EXEC DBMS_REPAIR.REBUILD_FREELISTS (‘TEST’,’EMP’, NULL, 1);
    NOTE
    Setting events 10210, 10211, 10212, and 10225 can be done by adding the following line for each event in the init.ora file:
    Event = "event_number trace name errorstack forever, level 10"
    When event 10210 is set, the data blocks are checked for corruption by checking their integrity. Data blocks that don't match the format are marked as soft corrupt.
    When event 10211 is set, the index blocks are checked for corruption by checking their integrity. Index blocks that don't match the format are marked as soft corrupt.
    When event 10212 is set, the cluster blocks are checked for corruption by checking their integrity. Cluster blocks that don't match the format are marked as soft corrupt.
    When event 10225 is set, the fet$ and uset$ dictionary tables are checked for corruption by checking their integrity. Blocks that don't match the format are marked as soft corrupt.
    Set event 10231 in the init.ora file to cause Oracle to skip software- and media-corrupted blocks when performing full table scans:
    Event="10231 trace name context forever, level 10"
    Set event 10233 in the init.ora file to cause Oracle to skip software- and media-corrupted blocks when performing index range scans:
    Event="10233 trace name context forever, level 10"
    To dump the Oracle block you can use below command from 8.x on words:
    SQL> ALTER SYSTEM DUMP DATAFILE 11 block 9;
    This command dumps datablock 9 in datafile11, into USER_DUMP_DEST directory.
    Dumping Redo Logs file blocks:
    SQL> ALTER SYSTEM DUMP LOGFILE ‘/usr/oracle8/product/admin/udump/rl. log’;
    Rollback segments block corruption, it will cause problems (ORA-1578) while starting up the database.
    With support of oracle, can use below under source parameter to startup the database.
    CORRUPTEDROLLBACK_SEGMENTS=(RBS_1, RBS_2)
    DB_BLOCK_COMPUTE_CHECKSUM
    This parameter is normally used to debug corruption’s that happen on disk.
    The following V$ views contain information about blocks marked logically corrupt:
    V$ BACKUP_CORRUPTION, V$COPY_CORRUPTION
    When this parameter is set, while reading a block from disk to catch, oracle will compute the checksum again and compares it with the value that is in the block.
    If they differ, it indicates that the block is corrupted on disk. Oracle makes the block as corrupt and signals an error. There is an overhead involved in setting this parameter.
    DB_BLOCK_CACHE_PROTECT=‘TRUE’
    Oracle will catch stray writes made by processes in the buffer catch.
    Oracle 9i new RMAN futures:
    Obtain the datafile numbers and block numbers for the corrupted blocks. Typically, you obtain this output from the standard output, the alert.log, trace files, or a media management interface. For example, you may see the following in a trace file:
    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'
    $rman target =rman/rman@rmanprod
    RMAN> run {
    2> allocate channel ch1 type disk;
    3> blockrecover datafile 9 block 13 datafile 2 block 19;
    4> }
    Recovering Data blocks Using Selected Backups:
    # restore from backupset
    BLOCKRECOVER DATAFILE 9 BLOCK 13 DATAFILE 2 BLOCK 19 FROM BACKUPSET;
    # restore from datafile image copy
    BLOCKRECOVER DATAFILE 9 BLOCK 13 DATAFILE 2 BLOCK 19 FROM DATAFILECOPY;
    # restore from backupset with tag "mondayAM"
    BLOCKRECOVER DATAFILE 9 BLOCK 13 DATAFILE 2 BLOCK 199 FROM TAG = mondayAM;
    # restore using backups made before one week ago
    BLOCKRECOVER DATAFILE 9 BLOCK 13 DATAFILE 2 BLOCK 19 RESTORE
    UNTIL 'SYSDATE-7';
    # restore using backups made before SCN 100
    BLOCKRECOVER DATAFILE 9 BLOCK 13 DATAFILE 2 BLOCK 19 RESTORE UNTIL SCN 100;
    # restore using backups made before log sequence 7024
    BLOCKRECOVER DATAFILE 9 BLOCK 13 DATAFILE 2 BLOCK 19 RESTORE
    UNTIL SEQUENCE 7024;
    글 수정:
    Min Angel (Yeon Hong Min, Korean)

  • Corrupt datablock of datafile reside on RAW devices

    Hi,
    I want to check BOLCKRECOVER for corrupt blocks on datafiles reside on RAW devices.
    Is there any tool/command tp corrupt datablock of datafile reside on RAW devices?
    Thanks,

    Please check following forums discussions, hope it will help .
    Re: command to list corrupted files before taking backup in rman
    http://sysdba.wordpress.com/2006/04/05/how-to-check-for-and-repair-block-corruption-with-rman-in-oracle-9i-and-oracle-10g/
    Re: Data block corrupted

  • RMAN logical backup containing unused blocks

    Dear Experts
    When i taking logical backup of datafile from RMAN utility i notify that it will also backed up all unused blocks from datafile, so what i need to do, how to avoid that unused block from being backed up while taking logical backup of datafiles.
    System details as follows
    HP Itanium server
    OS - Redhet Linux 5
    DB - Oracle10g
    Suggest me urgent.

    Here i am gonna show you the backup statistics for only those problematic datafiles
    DFNAME                                    DATAFILE_BLCKS     BLOCKS          DIFF
    /san_index/oradata/orcl/rajemitra_index1.dbf     1695744     9818          1685926
    /san_index/oradata/orcl/rajemitra_index2.dbf     1716224          8527          1707697
    /san_index/oradata/orcl/rajemitra_index3.dbf     1622016          9727          1612289
    /san_index/oradata/orcl/rajemitra_index4.dbf     1622016          9808          1612208
    /san_index/oradata/orcl/rajemitra_index1.dbf     1695744          24823          1670921
    /san_index/oradata/orcl/rajemitra_index2.dbf     1716224          19891          1696333
    /san_index/oradata/orcl/rajemitra_index3.dbf     1622016          20591          1601425
    /san_index/oradata/orcl/rajemitra_index4.dbf     1622016          17026          1604990
    /san_index/oradata/orcl/rajemitra_index1.dbf     1695744          21239          1674505
    /san_index/oradata/orcl/rajemitra_index2.dbf     1716224          17843          1698381
    /san_index/oradata/orcl/rajemitra_index3.dbf     1622016          19820          1602196
    /san_index/oradata/orcl/rajemitra_index4.dbf     1622016          14429          1607587
    /san_index/oradata/orcl/rajemitra_index1.dbf     1695744          33885          1661859
    /san_index/oradata/orcl/rajemitra_index2.dbf     1716224          41480          1674744
    /san_index/oradata/orcl/rajemitra_index3.dbf     1622016          32338          1589678
    /san_index/oradata/orcl/rajemitra_index4.dbf     1622016          26288          1595728
    /san_index/oradata/orcl/rajemitra_index1.dbf     1695744          10504          1685240
    /san_index/oradata/orcl/rajemitra_index2.dbf     1716224          18169          1698055
    /san_index/oradata/orcl/rajemitra_index3.dbf     1622016          16195          1605821
    /san_index/oradata/orcl/rajemitra_index4.dbf     1622016          11974          1610042
    /san_index/oradata/orcl/rajemitra_index1.dbf     1695744          16938          1678806
    /san_index/oradata/orcl/rajemitra_index2.dbf     1716224          25688          1690536
    /san_index/oradata/orcl/rajemitra_index3.dbf     1622016          30653          1591363
    /san_index/oradata/orcl/rajemitra_index4.dbf     1622016          20611          1601405
    /san_index/oradata/orcl/rajemitra_index1.dbf     1695744          965385          730359
    /san_index/oradata/orcl/rajemitra_index2.dbf     1716224          1010354          705870
    /san_index/oradata/orcl/rajemitra_index4.dbf     1622016          1004034          617982
    /san_index/oradata/orcl/rajemitra_index1.dbf     1695744          1695397          347
    /san_index/oradata/orcl/rajemitra_index2.dbf     1716224          1713435          2789
    /san_index/oradata/orcl/rajemitra_index3.dbf     1622016          1621255          761
    /san_index/oradata/orcl/rajemitra_index4.dbf     1622016          1620287          1729
    /san_index/oradata/orcl/rajemitra_index1.dbf     1695744          1695397          347
    /san_index/oradata/orcl/rajemitra_index5.dbf     1171456          1170831          625
    /san_index/oradata/orcl/rajemitra_index1.dbf     1695744          1695397          347
    /san_index/oradata/orcl/rajemitra_index2.dbf     1716224          1713470          2754
    /san_index/oradata/orcl/rajemitra_index3.dbf     1622016          1621261          755
    /san_index/oradata/orcl/rajemitra_index4.dbf     1622016          1620364          1652
    /san_index/oradata/orcl/rajemitra_index5.dbf     1171456          48547          1122909
    /san_index/oradata/orcl/rajemitra_index1.dbf     1695744          47875          1647869
    /san_index/oradata/orcl/rajemitra_index2.dbf     1716224          19725          1696499
    /san_index/oradata/orcl/rajemitra_index3.dbf     1622016          26205          1595811
    /san_index/oradata/orcl/rajemitra_index4.dbf     1622016          56040          1565976
    /san_index/oradata/orcl/rajemitra_index5.dbf     1171456          31859          1139597
    /san_index/oradata/orcl/rajemitra_index1.dbf     1695744          29509          1666235
    /san_index/oradata/orcl/rajemitra_index2.dbf     1716224          20767          1695457
    /san_index/oradata/orcl/rajemitra_index3.dbf     1622016          13210          1608806
    /san_index/oradata/orcl/rajemitra_index4.dbf     1622016          31411          1590605

  • RAC Crashed due to Corrupted Blocks

    Hi,
    I've got a RAC system which was crashed due to couple of corrupted blocks. This is 10g r2 standard edition 3 node system with ASM disk.
    Is there any way where I can get this system up and running avoiding these corrupted blocks.
    Thanks,
    Kam.

    Step 1: Identify the currupted blocks
    Option1:
    Following queries will help you identify which block is currupted.
    ##Read from v$backup_corruption
    SELECT distinct 'Data Block# '|| block# || ' of Data File '|| name || ' is corrupted.'
    FROM v$backup_corruption a, v$datafile b
    WHERE a.file# = b.file#;
    ##Read from v$copy_corruption
    SELECT distinct 'Data Block# '|| block# || ' of Data File '|| name || ' is corrupted.'
    FROM v$copy_corruption a, v$datafile b
    WHERE a.file# = b.file#;
    Option2:
    Use DBVERIFY utility to identify currupted blocks.
    Ex:
    $ dbv file=system_ts_01.dbf start=9 end=25 blocksize=16384 logfile=dbvsys_ts.log feedback=2
    Step2: Repair currupted block
    Once currupted blocks are identified, use RMAN (assuming you still have the backups without currupted blocks), to recover those blocks.
    Recovering Data blocks Using Selected Backups:
    # restore from backupset
    BLOCKRECOVER DATAFILE 9 BLOCK 13 DATAFILE 2 BLOCK 19 FROM BACKUPSET;
    # restore from datafile image copy
    BLOCKRECOVER DATAFILE 9 BLOCK 13 DATAFILE 2 BLOCK 19 FROM DATAFILECOPY;
    # restore from backupset with tag "mondayAM"
    BLOCKRECOVER DATAFILE 9 BLOCK 13 DATAFILE 2 BLOCK 199 FROM TAG = mondayAM;
    # restore using backups made before one week ago
    BLOCKRECOVER DATAFILE 9 BLOCK 13 DATAFILE 2 BLOCK 19 RESTORE
    UNTIL 'SYSDATE-7';
    # restore using backups made before SCN 100
    BLOCKRECOVER DATAFILE 9 BLOCK 13 DATAFILE 2 BLOCK 19 RESTORE UNTIL SCN 100;
    # restore using backups made before log sequence 7024
    BLOCKRECOVER DATAFILE 9 BLOCK 13 DATAFILE 2 BLOCK 19 RESTORE
    UNTIL SEQUENCE 7024;
    For example,
    $rman target =rman/rman@rmanprod
    RMAN> run {
    2> allocate channel ch1 type disk;
    3> blockrecover datafile 9 block 13 datafile 2 block 19;
    4> }
    If the currupted block's segment is an index, rebuilding index will take take care of the currupted block.
    You might want to read this nice article written by Vijaya R. Dumpa
    http://www.revealnet.com/newsletter-v4/0103_C.htm
    --Moid M                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Oracle combination of physical and logical ..

    hi to all
    can any smart man
    help me to understand how operating system block
    and
    datafiles
    r physical
    while
    tablespace,
    segements,
    extents
    are logical
    my mail adreess is [email protected]

    I don't see a reply so I'll take a shot. Just like you have 0-9 for numbers and you can arrange them anyway you want, you still only have 0-9. You have the physical (system block and datafiles) which are somewhat static. Then you have the the logical (tablespace, segements, extents)which are volatile and connected by chaining (links) which may be all over the place in the physical but appears to be one whole unit in the logical. Just like an image on a TV screen wearing a red hat, you see a red hat (logical) but it is actual pixels which are chained or linked (data pointers) to each other by the color red. I hope that helps until someone comes by with a better answer.

  • Changing ip of physical and logical host

    I have a 2 nodes Sun cluster 2.2 working. I have to put it in another lan, so I have to change both Physical and logical host and terminal concentrator and console ip addresses. How can I do?
    Thanks

    I don't see a reply so I'll take a shot. Just like you have 0-9 for numbers and you can arrange them anyway you want, you still only have 0-9. You have the physical (system block and datafiles) which are somewhat static. Then you have the the logical (tablespace, segements, extents)which are volatile and connected by chaining (links) which may be all over the place in the physical but appears to be one whole unit in the logical. Just like an image on a TV screen wearing a red hat, you see a red hat (logical) but it is actual pixels which are chained or linked (data pointers) to each other by the color red. I hope that helps until someone comes by with a better answer.

Maybe you are looking for