ORA-01578 block corrupted in OLAP instances

Hi all,
We found in almost every instance we got OLAP Option installed this error:
ORA-01578: bloque de datos ORACLE corrupto (archivo numero 3, bloque numero 1452)
ORA-01110: archivo de datos 3: 'G:\ORADATA\NKDW2\CWMLITE01.DBF'
ORA-06512: en "OLAPSYS.CWM2_OLAP_METADATA_REFRESH", linea 8
when executing:
cwm2_OLAP_METADATA_REFRESH.MR_REFRESH()
The first time we thought it was due to a "real" block corruption but when started to appear
in others instances (different physical machines) we really thought it could be a bug.
Several disk scans on linux and windows environments showed us everything was fine but Oracle
still persist in the block corruption.
Any ideas? your comments are welcome
Thanx in advanced
aLeX

Please confirm the corruption.
select tablespace_name
, segment_type
, owner
, segment_name
from dba_extents
where file_id='3'
and '1425' between block_id and block_id + blocks -1;
Since you're running into issues on several machines (on a procedure in a package) it's possible that a piece of the code might be corrupted in some way. Can you drop the package then recreate it? The ?/cwmlite/admin/cwm2mrrf.plb and cwm2mrrf.plb scripts recreate this bit. If it turns out you have a bad script we can wrap you a new one and send it.

Similar Messages

  • Block corruption in Free Space

    Hi,
    Environment:-
    Oralce 10.2.0
    Windows platform
    I am facing problem of Logical block corruption.
    RMAN validate block corruption (DBVerify as well) But no entry in Alert log file.
    When I check Which segment has block corruption I found that block corruption are in free blocks of tablespace (DBA_FREE_SPACE).
    To Fix it I create table and allocate corrupted block to that table. I confirm corrupted block allocation in table (using DBA_EXTENTS).
    But when I insert rows in that table to reuse corrupted block Oracle give error of ora-1578 Block corruption, and I am not able to reuse corrupted block(as many expert suggest to overcome block corruption in free space).
    I dropped table and recreate and repeat this process many times but still no success.
    So. can anybody help me on this.
    I appreciate your efforts and time you spend to read this
    Thanks

    Hello,
    Please check the link i posted.
    Example: Detecting Corruption
    The CHECK_OBJECT procedure checks the specified object, and populates the repair table with information about corruptions and repair directives. You can optionally specify a range, partition name, or subpartition name when you want to check a portion of an object.
    Validation consists of checking all blocks in the object that have not previously been marked corrupt. For each block, the transaction and data layer portions are checked for self consistency. During CHECK_OBJECT, if a block is encountered that has a corrupt buffer cache header, then that block is skipped.
    The following is an example of executing the CHECK_OBJECT procedure for the scott.dept table.
    SET SERVEROUTPUT ON
    DECLARE num_corrupt INT;
    BEGIN
    num_corrupt := 0;
    DBMS_REPAIR.CHECK_OBJECT (
    SCHEMA_NAME => 'SCOTT',
    OBJECT_NAME => 'DEPT',
    REPAIR_TABLE_NAME => 'REPAIR_TABLE',
    CORRUPT_COUNT => num_corrupt);
    DBMS_OUTPUT.PUT_LINE('number corrupt: ' || TO_CHAR (num_corrupt));
    END;
    SQL*Plus outputs the following line, indicating one corruption:
    number corrupt: 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....

  • Oracle V11.2.0.3 ORA-01578: ORACLE data block corrupted - OBJECT = IDL_UB1$

    Hi,
    I am running into a data corruption issue.
    My database is:
    SQL> select banner from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE 11.2.0.3.0 Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    The following information is written to the alert.log File
    alert.log File
    Mon Nov 07 17:24:12 2011
    Starting ORACLE instance (normal)
    LICENSE_MAX_SESSION = 0
    LICENSE_SESSIONS_WARNING = 0
    Picked latch-free SCN scheme 2
    Using LOG_ARCHIVE_DEST_1 parameter default value as USE_DB_RECOVERY_FILE_DEST
    Autotune of undo retention is turned on.
    IMODE=BR
    ILAT =27
    LICENSE_MAX_USERS = 0
    SYS auditing is disabled
    Starting up:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production.
    ORACLE_HOME = /home/oracle/dbhome
    System name: Linux
    Node name: dbl-ora
    Release: 2.6.18-274.3.1.el5 (This is rhel5.7 or CentOs5.7)
    Version: #1 SMP Tue Sep 6 20:14:03 EDT 2011
    Machine: i686 / vm
    Mon Nov 07 19:42:14 2011
    Corrupt Block Found
    TSN = 0, TSNAME = SYSTEM
    RFN = 1, BLK = 52346, RDBA = 4246650
    OBJN = 225, OBJD = 225, OBJECT = IDL_UB1$, SUBOBJECT =
    SEGMENT OWNER = SYS, SEGMENT TYPE = Table Segment
    Errors in file /home/oracle/diag/rdbms/ora11/K/trace/K_ora_5425.trc (incident=11053):
    ORA-01578: ORACLE data block corrupted (file # 1, block # 52346)
    ORA-01110: data file 1: '/home/oracle/oradata/ora11/system01.dbf'
    Incident details in: /home/oracle/diag/rdbms/ora11/K/incident/incdir_11053/K_ora_5425_i11053.trc
    I was even able to detect the row that is generating the issue.
    In my case the obj# 33573 until 33577 are causing the issue,
    though I have no idea what sort of objects are affected.
    SQL> select * from idl_ub1$ where obj#=33572;
    OBJ# PART VERSION PIECE# LENGTH P
    33572 1 0 0 9032 F
    SQL> select * from idl_ub1$ where obj#=33573;
    ERROR:
    ORA-01578: ORACLE data block corrupted (file # 1, block # 52346)
    ORA-01110: data file 1: '/home/oracle/oradata/ora11/system01.dbf'
    no rows selected
    SQL> select * from idl_ub1$ where obj#=33577;
    ERROR:
    ORA-01578: ORACLE data block corrupted (file # 1, block # 52358)
    ORA-01110: data file 1: '/home/oracle/oradata/ora11/system01.dbf'
    no rows selected
    SQL> select * from idl_ub1$ where obj#=33578;
    OBJ# PART VERSION PIECE# LENGTH P
    33578 1 0 0 9032 F
    Any idea, how to fix this problem without recreating the whole database?
    Thanks in advance.
    wmager
    Edited by: magerxr on Nov 7, 2011 8:27 AM

    magerxr wrote:
    Thanks again for your quick advise.
    Here comes the result of dbv against my system tablespace.
    [oracle@dbl-ora ~]$ dbv FILE=/home/oracle/oradata/ora11/system01.dbf
    DBVERIFY: Release 11.2.0.3.0 - Production on Mon Nov 7 22:39:11 2011
    Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
    DBVERIFY - Verification starting : FILE = /home/oracle/oradata/ora11/system01.dbf
    Page 52346 is influx - most likely media corrupt
    Corrupt block relative dba: 0x0040cc7a (file 1, block 52346)
    Fractured block found during dbv:
    Data in bad block:
    type: 6 format: 2 rdba: 0x0040cc7a
    last change scn: 0x0000.0010acfa seq: 0x1 flg: 0x04
    spare1: 0x0 spare2: 0x0 spare3: 0x0
    consistency value in tail: 0x00000000
    check value in block header: 0x8fda
    computed block checksum: 0xaafbselect owner, segment_type, segment_name from dba_extents
    where file_id = 1 and 52346 between block_id and block_id+blocks-1;
    >
    Page 52347 is marked corrupt
    Corrupt block relative dba: 0x0040cc7b (file 1, block 52347)
    Bad header found during dbv:
    Data in bad block:
    type: 1 format: 6 rdba: 0x0000a206
    last change scn: 0xacfa.0040cc7b seq: 0x10 flg: 0x00
    spare1: 0xfa spare2: 0xac spare3: 0x401
    consistency value in tail: 0x00000000
    check value in block header: 0x0
    block checksum disabled
    select owner, segment_type, segment_name from dba_extents
    where file_id = 1 and 52347 between block_id and block_id+blocks-1;
    Page 52361 is marked corrupt
    Corrupt block relative dba: 0x0040cc89 (file 1, block 52361)
    Bad header found during dbv:
    Data in bad block:
    type: 1 format: 6 rdba: 0x0000a206
    last change scn: 0xacfb.0040cc89 seq: 0x10 flg: 0x00
    spare1: 0xfb spare2: 0xac spare3: 0x401
    consistency value in tail: 0x32298500
    check value in block header: 0x0
    block checksum disabled
    select owner, segment_type, segment_name from dba_extents
    where file_id = 1 and 52361 between block_id and block_id+blocks-1;
    >
    >
    DBVERIFY - Verification complete
    Total Pages Examined : 122880
    Total Pages Processed (Data) : 81298
    Total Pages Failing (Data) : 0
    Total Pages Processed (Index): 22307
    Total Pages Failing (Index): 0
    Total Pages Processed (Other): 3349
    Total Pages Processed (Seg) : 1
    Total Pages Failing (Seg) : 0
    Total Pages Empty : 15910
    Total Pages Marked Corrupt : 16
    Total Pages Influx : 1
    Total Pages Encrypted : 0
    Highest block SCN : 4064615 (0.4064615)post results from 3 SQL above

  • ORA-01578: ORACLE data block corrupted (file # 1, block # 53713)

    When i tried to export data from db (Oracle 11g, 64bit on Linux)
    Im getting following error
    About to export specified users ...
    . exporting pre-schema procedural objects and actions
    EXP-00008: ORACLE error 604 encountered
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01578: ORACLE data block corrupted (file # 1, block # 53713)
    ORA-01110: data file 1: '/u02/oradata/RSDB1/system01.dbf'
    EXP-00083: The previous problem occurred when calling EXFSYS.DBMS_EXPFIL_DEPASEX P.schema_info_exp
    EXP-00008: ORACLE error 604 encountered
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01578: ORACLE data block corrupted (file # 1, block # 55497)
    ORA-01110: data file 1: '/u02/oradata/RSDB1/system01.dbf'
    EXP-00083: The previous problem occurred when calling SYS.DBMS_CUBE_EXP.schema_i nfo_exp
    . exporting foreign function library names for user WB_APP_MANAGER
    . exporting PUBLIC type synonyms
    EXP-00008: ORACLE error 604 encountered
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01578: ORACLE data block corrupted (file # 1, block # 44638)
    ORA-01110: data file 1: '/u02/oradata/RSDB1/system01.dbf'
    EXP-00000: Export terminated unsuccessfully
    I donot understand how to solve this issue Please help me to solve this issue..
    Thanks

    891620 wrote:
    When i tried to export data from db (Oracle 11g, 64bit on Linux)
    Im getting following error
    About to export specified users ...
    . exporting pre-schema procedural objects and actions
    EXP-00008: ORACLE error 604 encountered
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01578: ORACLE data block corrupted (file # 1, block # 53713)
    ORA-01110: data file 1: '/u02/oradata/RSDB1/system01.dbf'
    EXP-00083: The previous problem occurred when calling EXFSYS.DBMS_EXPFIL_DEPASEX P.schema_info_exp
    EXP-00008: ORACLE error 604 encountered
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01578: ORACLE data block corrupted (file # 1, block # 55497)
    ORA-01110: data file 1: '/u02/oradata/RSDB1/system01.dbf'
    EXP-00083: The previous problem occurred when calling SYS.DBMS_CUBE_EXP.schema_i nfo_exp
    . exporting foreign function library names for user WB_APP_MANAGER
    . exporting PUBLIC type synonyms
    EXP-00008: ORACLE error 604 encountered
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01578: ORACLE data block corrupted (file # 1, block # 44638)
    ORA-01110: data file 1: '/u02/oradata/RSDB1/system01.dbf'
    EXP-00000: Export terminated unsuccessfully
    I donot understand how to solve this issue Please help me to solve this issue..
    Thanksrun dbv against '/u02/oradata/RSDB1/system01.dbf'
    & post results back here
    dbv
    DBVERIFY: Release 11.2.0.1.0 - Production on Fri Oct 14 20:39:11 2011
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    Keyword     Description                    (Default)
    FILE        File to Verify                 (NONE)
    START       Start Block                    (First Block of File)
    END         End Block                      (Last Block of File)
    BLOCKSIZE   Logical Block Size             (8192)
    LOGFILE     Output Log                     (NONE)
    FEEDBACK    Display Progress               (0)
    PARFILE     Parameter File                 (NONE)
    USERID      Username/Password              (NONE)
    SEGMENT_ID  Segment ID (tsn.relfile.block) (NONE)
    HIGH_SCN    Highest Block SCN To Verify    (NONE)
                (scn_wrap.scn_base OR scn)         

  • ORA-01578: ORACLE data block corrupted on tables in sysaux tablespace

    Dear Experts,
    From the alert log file we noticed data block corruptions on one of our datafiles. After further investigation, we realized that the corruptions were on 3 of the AWR related tables in the SYSAUX tablespace:
    1. WRH$_LIBRARYCACHE
    2. WRH$_TEMPSTATXS
    3. WRI$_ALERT_OUTSTANDING
    The bad news is that we may not have a valid rman backup to do the recovery due to the retention policy - RECOVERY WINDOW OF 2 DAYS. Since this is a development database with limited monitoring, we did not discover the corruption until 6 days later. The issue happened about 6 days ago (about Christmas time).
    So, what are our recovery options? Can someone advice? We are thinking about drop and recreate the 3 affected v$WR* tables, but not quite sure about the impact to the system if we drop and recreate the 3 objects. Did someone experience this type of recovery. If you did, what are your approaches?
    We are running oracle 10.2.0.3 version.
    I greatly appreciate your input and suggestion. Thanks!!!

    as long as you have a backup of ur database before christmas, you can use the " MAXDAYS " cmd to get ur backup working so long as you have not used delete obsolote....had a same sistuation....where i had a backup and trying to restore it ...kept saying no valid backup...after going thru some stuff...found the MAXDAYS cmd to use my backup...here is an example ...
    $ rman target /
    Recovery Manager: Release 10.2.0.2.0 - Production on Sun Apr 6 09:05:44 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    connected to target database (not started)
    RMAN> SET DBID=1528894801
    executing command: SET DBID
    RMAN> startup force nomount;
    startup failed: ORA-01078: failure in processing system parameters
    LRM-00109: could not open parameter file '/u01/app/oracle/product/10.2.0/db_1/dbs/initsameera.ora'
    starting Oracle instance without parameter file for retrival of spfile
    Oracle instance started
    Total System Global Area 159383552 bytes
    Fixed Size 1259672 bytes
    Variable Size 58722152 bytes
    Database Buffers 92274688 bytes
    Redo Buffers 7127040 bytes
    RMAN> set controlfile autobackup format for device type disk to '/u99/backup/sameera/control_spfile_%F';
    executing command: SET CONTROLFILE AUTOBACKUP FORMAT
    using target database control file instead of recovery catalog
    RMAN> run
    2> {
    3> allocate channel p1 type disk;
    4> restore spfile to pfile '/u01/app/oracle/product/10.2.0/db_1/dbs/initsameera.ora' from autobackup;
    5> shutdown abort;
    6> }
    allocated channel: p1
    channel p1: sid=36 devtype=DISK
    Starting restore at 06-APR-08
    channel p1: looking for autobackup on day: 20080406
    channel p1: looking for autobackup on day: 20080405
    channel p1: looking for autobackup on day: 20080404
    channel p1: looking for autobackup on day: 20080403
    channel p1: looking for autobackup on day: 20080402
    channel p1: looking for autobackup on day: 20080401
    channel p1: looking for autobackup on day: 20080331
    channel p1: no autobackup in 7 days found
    released channel: p1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 04/06/2008 09:09:09
    RMAN-06172: no autobackup found or specified handle is not a valid copy or piece
    Solution:
    RMAN> shutdown abort;
    RMAN> EXIT;
    $ ps -ef |grep pmon
    oracle 2891 2856 0 09:05 pts/1 00:00:00 grep pmon
    oracle 7448 1 0 Apr05 ? 00:00:00 ora_pmon_primary
    $export ORACLE_SID=sameera
    $ rman target /
    Recovery Manager: Release 10.2.0.2.0 - Production on Sun Apr 6 09:05:44 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    connected to target database (not started)
    RMAN> SET DBID=1528894801
    executing command: SET DBID
    RMAN> startup force nomount;
    startup failed: ORA-01078: failure in processing system parameters
    LRM-00109: could not open parameter file '/u01/app/oracle/product/10.2.0/db_1/db s/initsameera.ora'
    starting Oracle instance without parameter file for retrival of spfile
    Oracle instance started
    Total System Global Area 159383552 bytes
    Fixed Size 1259672 bytes
    Variable Size 58722152 bytes
    Database Buffers 92274688 bytes
    Redo Buffers 7127040 bytes
    RMAN> set controlfile autobackup format for device type disk to '/u99/backup/sameera/control_spfile_%F';
    executing command: SET CONTROLFILE AUTOBACKUP FORMAT
    using target database control file instead of recovery catalog
    RMAN> run
    2> {
    3> allocate channel p1 type disk;
    4> restore spfile to pfile '/u01/app/oracle/product/10.2.0/db_1/dbs/initsameera.ora' from autobackup maxdays 15;
    5> shutdown abort;
    6> }
    released channel: ORA_DISK_1
    allocated channel: p1
    channel p1: sid=36 devtype=DISK
    Starting restore at 06-APR-08
    channel p1: looking for autobackup on day: 20080406
    channel p1: looking for autobackup on day: 20080405
    channel p1: looking for autobackup on day: 20080404
    channel p1: looking for autobackup on day: 20080403
    channel p1: looking for autobackup on day: 20080402
    channel p1: looking for autobackup on day: 20080401
    channel p1: looking for autobackup on day: 20080331
    channel p1: looking for autobackup on day: 20080330
    channel p1: looking for autobackup on day: 20080329
    channel p1: looking for autobackup on day: 20080328
    channel p1: looking for autobackup on day: 20080327
    channel p1: looking for autobackup on day: 20080326
    channel p1: looking for autobackup on day: 20080325
    channel p1: looking for autobackup on day: 20080324
    channel p1: looking for autobackup on day: 20080323
    channel p1: autobackup found: /u99/backup/sameera/control_spfile_c-1528894801-20080323-00
    channel p1: SPFILE restore from autobackup complete
    Finished restore at 06-APR-08
    Oracle instance shut down
    Check to make sure if initsameera.ora exists in $ORACLE_HOME/dbs location.
    $ cd $ORACLE_HOME/dbs
    $ ls -ltr
    total 7052
    -rw-r----- 1 oracle oinstall 2560 Apr 5 13:21 spfileprimary.ora
    -rw-r----- 1 oracle oinstall 7061504 Apr 5 13:23 snapcf_primary.f
    -rw-rw---- 1 oracle oinstall 1544 Apr 5 18:42 hc_sameera.dat
    -rw-r--r-- 1 oracle oinstall 1087 Apr 6 09:12 initsameera.ora
    $ pwd
    /u01/app/oracle/product/10.2.0/db_1/dbs
    $

  • Data blocks are corrupted : Error ORA-01578

    Hi All,
    We having a serious problem with the oracle running in our development server.
    Data blocks are corrupted with the error ORA-01578
    and we have identified the segment as an Table TBTCO.
    Hence can any body suggest us the way to resolve this.
    Currently we dont require any data from that table. In that
    case can we drop down the table and import it again with
    the same table downloaded from production server?
    As we dont have any oracle DBA's please suggest us the way to resolve this.
    Please advise.
    Thanks & Regards,
    DVRK

    Hey,
    if you are using RMAN backup you can restore and recover only the corrupted blocks.
    For more information take a look at that nice blog article from Lars:
    Some hints to make handling of oracle datablock corruptions more efficient
    If you don't have any idea howto handle this situation, please open a SAP call.
    Regards
    Stefa

  • ORA-01578: ORACLE data block corrupted

    Dera Guru's,
    In SAP i have following error in Oracle Database
    SQL error in the database when accessing a table
    "Database error text........: "ORA-01578: ORACLE data block corrupted (file #
    38, block # 72576) ORA-01110: data file 38:
    'K:\ORACLE\D01\SAPDATA4\D01_12\D01.DATA12'"
    How can i resolve it.Please guide me...
    Thank you for your help and advice....

    Error: ORA-01578 (ORA-1578)
    Text: ORACLE data block corrupted (file # %s, block # %s)
    Cause: The data block indicated was corrupted, mostly due to software errors.
    Action: Try to restore the segment containing the block indicated. This
    may involve dropping the segment and recreating it. If there
    is a trace file, report the errors in it to your ORACLE
    representative.
    Do you already identify the object corrupted ?
    What kind of backup do you have ?
    Edited by: marcopb on Sep 10, 2012 2:47 PM

  • Ora-01578 data block got corrupted

    hi folks,
    im running oracle9i and using VB6.0 as my front-end. suddenly in my application i got the above error and after a couple of minutes everything is fine.
    i would like to know from the guru's and pandits of oracle why this error occurs and what is the best solution to avoid these type of errors in future.
    thanks to one n all
    have a nice day n night as well

    First you need to find out the corrupted block details using available different methods, that is, ANALYZE, DB_VERIFY, DBMS_REPAIR, DB_BLOCK_CHECKING etc., and correct or repair the data block corruption
    For more details on how to detect and repair the data block corruption, take a look at the below Oracle Documentations.
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96521/repair.htm
    Oracle Metalink Note:28814.1
    Subject “Handling Oracle Block Corruptions in Oracle7/8/8i/9i/10g”
    Asktom Links for block corruption
    http://asktom.oracle.com/pls/asktom/f?p=100:1:1990916026426034::NO:RP::
    Regards,
    Sabdar Syed.

  • 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.

  • DATA BLOCK CORRUPTION : ORA-1578 해결 방법

    제품 : ORACLE SERVER
    작성날짜 : 2005-08-18
    DATA BLOCK CORRUPTION : ORA-1578 해결 방법
    =========================================
    모든 오라클 데이타 블럭은 sequence 번호(seq)와 incarnation 번호(inc)를
    갖고 있다. ORA-1578 에러는 seq=0 이고 inc <> 0 (새로운 블럭이 아님)일 때
    발생한다. ORA-1578 에러는 ORA-600[3339] 에러와 함께 발생하곤 한다.
    ORA-1578 에러가 발생하면 corruption이 발생한 화일 번호와 블럭 번호를
    알려준다. 여기서는 이 때의 화일번호를 f, 블럭번호를 b 라고 부르기로 한다.
    <해결 방법>
    1) 우선 해야 할 일은 어떠한 오브젝트가 corrupt 되었는가를 알아내는 것이다.
    다음의 스크립트를 이용하면 알 수 있다.
    SQL>select segment_name, segment_type
    from dba_extents
    where file_id = f and
    b between block_id and block_id + blocks - 1;
    2) 만약 해당 세그먼트가 인덱스이면 drop 시키고 다시 생성하면 된다.
    3) 만약 해당 세그먼트가 테이블이면 corrupt된 블럭의 데이타는 손상된 것이다.
    4) 만약 해당 테이블이 들어있는 export 화일이 있다면 손상된 테이블을 drop
    시키고 import 받는 것이 제일 간단한 방법이다. 하지만, 만약 export 받은
    화일이 없거나 backup해 놓은 화일도 없다면 해당 테이블에 인덱스가 생성되어
    있는 경우에 한해서 다음의 방법을 사용해서 복구를 하도록 한다.
    5) 해당 테이블에 대한 인덱스가 생성되어 있다면 이를 이용해서 corrupt된
    블럭을 피해갈 수 있다. 이 방법은 다음과 같다.
    - empno, ename, deptno 를 컬럼으로 가지는 emp 테이블이 corrupt 되었다고
    가정하자. 그리고, empno 컬럼에 인덱스가 생성되어 있다고 하자. 클러스터화
    되지 않은 모든 테이블은 Unique한 rowid를 가진다.
    rowid를 varchar2/hexadecimal 형식으로 표현하려면 rowidtochar 함수를 이용
    한다.
    SQL> select rowidtochar(rowid) from emp;
    rowid는 총 18자로 block address(8자), dot(1자), row address(4자),
    dot(1자), file address(4자)로 구성되어 있다.
    SQL> select empno, rowid
    from emp
    where empno > 0
    위의 스크립트를 실행시키면 다음과 같은 결과를 얻게 된다.
    EMPNO ROWID
    100 00000003.0000.0006
    101 00000003.0001.0006
    102 00000003.0002.0006
    103 00000003.0003.0006
    500 00000004.0000.000A
    501 00000004.0001.000A
    755 0000001A.0005.000A
    756 0000001A.000C.000A
    만약 인덱스가 character 컬럼에 대한 것이었다면 위의 query 문장을 다음과 같
    이 바꿀 수 있다.
    SQL> select empno, rowid
    from emp
    where empno > '';
    예를 들어 다음과 같은 에러 메시지가 떨어졌다고 하자.
    01578, 00000, "ORACLE data block corrupted (file # 10, block # 4)
    그러면, 다음의 스크립트를 사용하여 손상된 블럭에 있는 employee 에 대한
    empno를 구할 수 있다.
    SQL> select empno from emp
    where empno > 0
    and rowidtochar(rowid) like '00000004.%.000A';
    EMPNO ROWID
    500 00000004.0000.000A
    501 00000004.0001.000A
    이제 emp 테이블과 같은 구조를 갖는 새로운 테이블을 만든다.
    SQL> create table temp
    as select * from emp
    where 1 = 2;
    그런 다음 손상된 부분을 피해서 새로운 테이블에 손상된 테이블의 데이타를
    추가한다.
    SQL> insert into temp select * from emp where empno < 500;
    SQL> insert into temp select * from emp where empno > 501;
    손상된 테이블을 drop 시키고 temp 테이블의 이름을 emp로 변경한다.
    그리고, 백업된 자료나 문서 자료를 통하여 손상된 부분에 대한 정보를 추가한다.
    6) 손상된 블럭에 여러 개의 row가 존재하고 있다면 다음의 방법을 이용한다.
    SQL> create table empnos as
    select empno from emp
    where empno > 0
    and rowidtochar(rowid) not like '00000004.%.000A';
    이 스크립트를 이용하면 손상된 block에 포함되지 않는 empno들을 알 수 있다.
    다음의 스크립트를 계속 실행시켜 복구를 한다.
    SQL> create table temp as select * from emp where 1 = 2;
    SQL> insert into temp
    select emp.empno, emp.ename, emp.deptno
    from emp, empnos
    where emp.empno > 0
    and emp.empno = empnos.empno;
    7) 만약 Data Dictionary의 table이나 index에서 손상된 block이 발생했다면
    지원을 요청해야 한다.

    Hi,
    Take a look in the following Metalink Notes:
    - DBMS_REPAIR example - Doc ID: NOTE:68013.1
    - Handling Oracle Block Corruptions in Oracle7/8/8i/9i/10g - Doc ID: NOTE:28814.
    - Prevention, Detection and Repair of Database Corruption - Doc ID: NOTE:76375.1
    Cheers,
    Francisco Munoz Alvarez
    http://www.oraclenz.com

  • ORA-01578 - bad blocks.

    Hello,
    We had a SAN crash last month and with all the confusion I missed that we had some bad blocks after the crash. Our RMAN backups have now aged out so we don't have a RMAN backup. What I do have is a datapump backup from before the event. This is table corruption. Is there a way to either restore the table to a stage location, catalog the table or datafile somehow, then restore the bad block? Otherwise, somehow determine the bad data and get the data from the backed up table and insert it back into the bad table after I re-recreate it without the bad blocks?
    Oracle support is just saying recreate the table skipping the bad blocks but there has to be some way here if the data is on that datapump backup that I can determin what it is then restore it.
    Thanks

    The fix blocks procedure did not work and I have not attempted the skip blocks. If I run the skip corrupt blocks will my query work? Is that worth a shot next?
    select count(*) TRACKING_ID from JEBCS3NM.TRACKABLE_OBJECT t, JEBCS3NM.CONVEYANCE c where c.TRACKABLE_OBJECT_GUID = t.TRACKABLE_OBJECT_GUID and PRIMARY_MOVER_ID is null
    ERROR at line 1:
    ORA-01578: ORACLE data block corrupted (file # 75, block # 1024073)
    ORA-01110: data file 75: '/u02/oradata/bcso/jebcs3nm_d.dbf'
    SELECT OBJECT_NAME, BLOCK_ID, MARKED_CORRUPT
      2       FROM REPAIR_TABLE;
    OBJECT_NAME                      BLOCK_ID MARKED_COR
    CONVEYANCE                        1024073 TRUE
    CONVEYANCE                        1024105 TRUE
    CONVEYANCE                        1024113 TRUE
    SQL> SET SERVEROUTPUT ON
    SQL> DECLARE num_fix INT;
      2  BEGIN
    num_fix := 0;
    DBMS_REPAIR.FIX_CORRUPT_BLOCKS (
         SCHEMA_NAME => 'JEBCS3NM',
      6       OBJECT_NAME=> 'CONVEYANCE',
      7       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;
    12  /
    num fix: 0
    PL/SQL procedure successfully completed.

  • ORA-12528: TNS: listener: all appropriate instances are blocking new connec

    Hi this is kumar,
    i am getting the below error .
    ORA-12528: TNS: listener: all appropriate instances are blocking new connections
    please find my alertlog file ,in alert log file we are getting opertaion timed out.
    TNS-12535: TNS:operation timed out
    ns secondary err code: 12560
    nt main err code: 505
    TNS-00505: Operation timed out
    nt secondary err code: 238
    nt OS err code: 0
    Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=10.254.254.32)(PORT=1599))

    Hi,
    thank you for your quick responce.
    $ srvctl config scan_listener
    SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1526
    SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1526
    SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1526
    $ lsnrctl status LISTENER_SCAN1
    LSNRCTL for HPUX: Version 11.2.0.2.0 - Production on 22-APR-2013 20:38:33
    Copyright (c) 1991, 2010, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))
    STATUS of the LISTENER
    Alias LISTENER_SCAN1
    Version TNSLSNR for HPUX: Version 11.2.0.2.0 - Production
    Start Date 30-JAN-2013 01:46:21
    Uptime 82 days 18 hr. 52 min. 12 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
    Listener Log File /u01/app/11.2.0/grid/log/diag/tnslsnr/dccdb01/listener_scan1/alert/log.xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_SCAN1)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.44.83.111)(PORT=1526)))
    Services Summary...
    Service "instance" has 2 instance(s).
    Instance "instance1", status READY, has 1 handler(s) for this service...
    Instance "instance2", status READY, has 1 handler(s) for this service...
    Service "instanceXDB" has 2 instance(s).
    Instance "instance1", status READY, has 1 handler(s) for this service...
    Instance "instance2", status READY, has 1 handler(s) for this service...
    Service "instance" has 2 instance(s).
    Instance "instance1", status READY, has 1 handler(s) for this service...
    Instance "instance2", status READY, has 1 handler(s) for this service...
    Service "instanceXDB" has 2 instance(s).
    Instance "instance1", status READY, has 1 handler(s) for this service...
    Instance "instance2", status READY, has 1 handler(s) for this service...
    Service "instanceoltp" has 2 instance(s).
    Instance "instance1", status READY, has 1 handler(s) for this service...
    Instance "instance2", status READY, has 1 handler(s) for this ser
    $
    ABCD =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = dccdb-cluster-scan)(PORT = 1526))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = ABCD)
    ADCDE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = dccdb-cluster-scan)(PORT = 1526))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = ADCDE)
    we didn't do any changes from the database side,now only my user had raised a complaint

  • BLOCK CORRUPTION (ORACLE8 에서 ORA-1578 조치방법)

    제품 : ORACLE SERVER
    작성날짜 : 2002-04-26
    BLOCK CORRUPTION (ORACLE8 에서 ORA-1578 조치방법)
    ================================================
    PURPOSE
    본 bulletin 에서는 Oracle8 에서의 data block corruption error
    (ORA-1578) 에 대해서 조치방법을 알아본다.
    BACKGROUND
    ORA-1578 은 data block 에 corruption 이 생긴 경우에 발생한다.
    이 error 는 corruption 이 발생한 곳의 file number 와 block
    number 를 알려준다.
    본 bulletin 에서는 file number 를 'f', block number 를 'b' 로
    지칭하기로 한다. ORA-1578 과 함께 return 되는 file number는
    relative file number 가 아닌 absolute file number 를 의미한다.
    (Oracle8 에서 새롭게 소개된 relative file number 에 대해서는 본
    bulletin 의 6번 항목에서 다루도록 한다.)
    RESOLUTION
    1. 최선의 해결책은 backup 받아둔 file 을 restore 한 후
    recover 작업을 하는 것이다. 이 작업을 위해서는 archive
    log mode 로 운영 중이어야 한다.
    dba_data_files 또는 v$datafile 과 ORA-1578 error 에서
    return 된 absolute file number 를 이용하여 corruption이
    발생한 datafile 의 이름을 알아낼 수 있다.
    Oracle8 에서는, dba_data_files 에 absolute file number
    (file_id) 와 함께 relative file number (relative_fno) 를
    가지고 있다.
    v$datafile 에는 아직 absolute file number (file#) 만을 가진다.
    backup 을 restore 하기 전에 hardware 의 문제를 fix 해야 할
    필요가 있을 수 있다. 만약 corruption 이 disk 불량에 의해
    발생하였다면, backup 받아둔 datafile 을 문제가 없는 disk 에
    restore 하고, startup mount 한 후, 새로운 위치로 datafile
    rename 을 하고 recover 한다.
    만약 해당 datafile 이 system tablespace 에 속하지 않는다면
    offline tablespace recovery 도 가능하다.
    2. backup datafile 을 restore 하고 recover 하지 않을 것이라면
    우선, 어떤 object 에서 corruption 이 발생하였는지 확인해야
    한다.
    다음의 SQL 문을 이용한다.
    SELECT owner, segment_name, segment_type, relative_fno
    FROM dba_extents
    WHERE file_id = f
    AND b BETWEEN block_id AND block_id + blocks - 1 ;
    3. 해당 segment 가 non-data dictionary index라면, 해당 index를
    drop 한 후 재생성한다.
    4. 해당 segment 가 table 이라면, corruption 이 발생한 block 의
    data 는 소실된 것이다.
    5. 만약 해당 table 에 대한 최근의 export dump file이 존재한다면,
    해당 table 을 drop 한 후 import 함으로써 복구할 수 있다.
    최근의 export dump file 이 없거나 이를 export 받을 수 있는
    최근의 backup 이 없다면 다음과 같은 방법을 이용할 수 있다.
    6. corruption 이 발생한 non-clustered table 에서 corrupted
    block 을 access 하지 않고 나머지 data 들을 select 할 수
    있도록 ROWID 를 이용할 수 있다. non-clustered table의 모든
    row 들은 해당 row 의 물리적인 주소를 가리키는 고유한 ROWID를
    갖는다(해당 row가 여러 block에 조각이 나 있다면 첫번째 조각에
    대한 주소). clustered table 인 경우에는 서로 다른 table 의
    data 들이 같은 block 에 존재할 수 있으며, 같은 ROWID 를 가질
    수 있다.
    Oracle 은 index 를 구성하기 위하여 내부적으로 ROWID 를 사용한다.
    따라서 where 절에 ROWID 를 사용하여 select 하면 강제로 range
    scan 를 할 수 있다.
    Oracle8 에서는 이를 위하여 ROWID hint 를 사용할 필요가
    없어졌다.
    ROWID 를 이용하여 table 로부터 data 를 추출하기
    예제로써 ACCT_NO, PERSON, WEEKNO 등의 column 으로 구성된
    SCOTT user의 EXAMPLE 이라는 table 이 있다고 가정한다.
    이때, ORA-1578 "ORACLE data block corrupted (file # 5,
    block # 2) 가
    발생하였다고 가정하자.
    ROWID in Oracle8 :
    Oracle8 에서의 ROWID 는 'OOOOOOFFFBBBBBBSSS' format 을 가진다.
    OOOOOO = data object number
    Oracle7 의 object_id 와는 별도로 segment 의 id 를 갖는다.
    dba_objects 의 data_object_id 에서 확인가능
    FFF = relative file number
    BBBBBB = block number
    SSS = row number
    Oracle8에서의 ROWID 는 absolute file number 가 아닌 relative
    file number 를 갖는다는 점에 주목해야 한다.
    relative file number 는 tablespace 에 대해 상대적이며
    (tablespace마다 첫번째, 두번째, 세번째 datafile 을 가질 수
    있음을 의미) absolute file number 는 전체 database 내에서
    고유하다. 두개의 서로다른 file 들이 동일한 relative file
    number를 가질 수 있다.
    만약 EXAMPLE table 에서 ACCT_NO, ROWID 를 select하면 다음과
    같은 결과가 나올 수 있다.
    ACCT_NO ROWID
    12345 AAAAh3AAGAAACJAAAA
    19283 AAAAh3AAGAAACJAAAB
    22345 AAAAh4AAFAAAAADAAA
    60372 AAAAh4AAFAAAAADAAB
    33456 AAAAh5AAEAAAAIuAAA
    29473 AAAAh5AAEAAAAIuAAB
    이러한 format 을 extended ROWID character format 이라고
    지칭한다.
    extended ROWID 는 number 이므로 substr 함수를 이용하여
    extended ROWID 로부터 일부를 떼어낼 수 없다.
    ROWID 를 생성하기 위해서는 모든 component 를 알아야 한다.
    그런다음, DBMS_ROWID package 의 function 을 이용하여 ROWID 를
    생성할 수 있다.
    function rowid_create(rowid_type IN number,
    object_number IN number,
    relative_fno IN number,
    block_number IN number,
    row_number IN number)
    return rowid;
    pragma RESTRICT_REFERENCES(rowid_create,WNDS,RNDS,WNPS,RNPS);
    -- rowid_type - type (restricted=0/extended=1)
    -- object_number - data object number
    (rowid_object_undefined for )
    -- restricted
    -- relative_fno - relative file number
    -- block_number - block number in this file
    -- file_number - file number in this block
    corruption 이 발생한 block 의 data object number 를 알기
    위해서는 dba_objects 를 조회한다.
    SELECT data_object_id FROM dba_objects
    WHERE owner = 'SCOTT'
    AND object_name = 'EXAMPLE' ;
    DATA_OBJECT_ID
    2168
    우리는 이미, 위에서 사용한 다음의 SQL 에 의해서 relative file
    number 를 알고 있다.
    SELECT owner, segment_name, segment_type, relative_fno
    FROM dba_extents
    WHERE file_id = 5
    AND 2 BETWEEN block_id AND block_id + blocks - 1 ;
    OWNER SEGMENT_NAME SEGMENT_TYPE RELATIVE_F
    SCOTT EXAMPLE TABLE 5
    corruption 이 발생한 block 이 2이므로, block# 2 이전의 access
    가능한 마지막 ROWID 는 block# 1 에 존재한다. 그리고 block# 2
    이후의 access 가능한 첫 ROWID 는 block# 3에 존재한다. block
    안에 몇개의 row number 가 존재할 지 모르므로 row number 0 을
    이용한다.
    이제 corrupted block 이전의 ROWID 와 이후의 ROWID 를 생성할
    준비가 끝났다.
    corrupted block 이전의 ROWID :
    SELECT DBMS_ROWID.ROWID_CREATE(1,2168,5,1,0) FROM example ;
    DBMS_ROWID.ROWID_C
    AAAAh4AAFAAAAABAAA
    corrupted block 이후의 ROWID :
    SELECT DBMS_ROWID.ROWID_CREATE(1,2168,5,3,0) FROM example ;
    DBMS_ROWID.ROWID_C
    AAAAh4AAFAAAAADAAA
    다음으로, EXAMPLE table 과 같은 spec 으로 table 을 하나 만든다.
    CREATE TABLE temp AS SELECT * FROM example WHERE 1=2;
    그리고 corrupted block 이외의 block 에서 data 를 추출하여
    insert 한다.
    INSERT INTO temp SELECT * FROM example
    WHERE ROWID <= 'AAAAh4AAFAAAAABAAA';
    INSERT INTO temp SELECT * FROM example
    WHERE ROWID >= 'AAAAh4AAFAAAAADAAA';
    이후 원본 table 을 drop 하고, TEMP 를 rename 한다.
    7. 만약 data dictionary 에 속하는 table, index 또는 rollback
    segment에 corrupted block 이 발생하였다면 Oracle Support 의
    지원을 받는다.
    8. 일반적으로, ORA-1578 은 hardware 의 문제때문에 유발된다.
    하지만 만약에 ORA-600[3374] 가 발생한다면 memory 상에서
    corruption 이 발생한 경우이다.
    이 경우 database 를 restartup 하면 문제가 해결될 수 있다.
    Reference Documents
    --------------------

    Hello,
    Please check the link i posted.
    Example: Detecting Corruption
    The CHECK_OBJECT procedure checks the specified object, and populates the repair table with information about corruptions and repair directives. You can optionally specify a range, partition name, or subpartition name when you want to check a portion of an object.
    Validation consists of checking all blocks in the object that have not previously been marked corrupt. For each block, the transaction and data layer portions are checked for self consistency. During CHECK_OBJECT, if a block is encountered that has a corrupt buffer cache header, then that block is skipped.
    The following is an example of executing the CHECK_OBJECT procedure for the scott.dept table.
    SET SERVEROUTPUT ON
    DECLARE num_corrupt INT;
    BEGIN
    num_corrupt := 0;
    DBMS_REPAIR.CHECK_OBJECT (
    SCHEMA_NAME => 'SCOTT',
    OBJECT_NAME => 'DEPT',
    REPAIR_TABLE_NAME => 'REPAIR_TABLE',
    CORRUPT_COUNT => num_corrupt);
    DBMS_OUTPUT.PUT_LINE('number corrupt: ' || TO_CHAR (num_corrupt));
    END;
    SQL*Plus outputs the following line, indicating one corruption:
    number corrupt: 1

  • RMAN-05501: RMAN-11003 ORA-00353: log corruption near block 2048 change

    Hi Gurus,
    I've posted few days ago an issue I got while recreating my Dataguard.
    The Main issue was while duplicating target from active database I got this errors during the recovery process.
    The Restore Process Went fine, RMAN Copied the Datafiles very well, but stop when at the moment to start the recovery process from the auxiliary db
    Yesterday I took one last try,
    I follow same procedure, the one described in all Oracle Docs, Google and so on ... it's not a secret I guess.
    The I got the same issue, same errors.
    I read soemthing about archivelogs, and the Block corruption and so on, I've tried so many things (register the log... etc etc ), and than I read something about "catalog the logfile)
    and that's waht I did.
    But I was just connect to the target db.
    contents of Memory Script:
    set until scn 1638816629;
    recover
    standby
    clone database
    delete archivelog
    executing Memory Script
    executing command: SET until clause
    Starting recover at 14-MAY-13
    starting media recovery
    archived log for thread 1 with sequence 32196 is already on disk as file /archives/CMOVP/stby/1_32196_810397891.arc
    archived log for thread 1 with sequence 32197 is already on disk as file /archives/CMOVP/stby/1_32197_810397891.arc
    archived log for thread 1 with sequence 32198 is already on disk as file /archives/CMOVP/stby/1_32198_810397891.arc
    archived log for thread 1 with sequence 32199 is already on disk as file /archives/CMOVP/stby/1_32199_810397891.arc
    archived log for thread 1 with sequence 32200 is already on disk as file /archives/CMOVP/stby/1_32200_810397891.arc
    archived log for thread 1 with sequence 32201 is already on disk as file /archives/CMOVP/stby/1_32201_810397891.arc
    archived log for thread 1 with sequence 32202 is already on disk as file /archives/CMOVP/stby/1_32202_810397891.arc
    archived log for thread 1 with sequence 32203 is already on disk as file /archives/CMOVP/stby/1_32203_810397891.arc
    archived log for thread 1 with sequence 32204 is already on disk as file /archives/CMOVP/stby/1_32204_810397891.arc
    archived log for thread 1 with sequence 32205 is already on disk as file /archives/CMOVP/stby/1_32205_810397891.arc
    archived log for thread 1 with sequence 32206 is already on disk as file /archives/CMOVP/stby/1_32206_810397891.arc
    archived log for thread 1 with sequence 32207 is already on disk as file /archives/CMOVP/stby/1_32207_810397891.arc
    archived log for thread 1 with sequence 32208 is already on disk as file /archives/CMOVP/stby/1_32208_810397891.arc
    archived log for thread 1 with sequence 32209 is already on disk as file /archives/CMOVP/stby/1_32209_810397891.arc
    archived log for thread 1 with sequence 32210 is already on disk as file /archives/CMOVP/stby/1_32210_810397891.arc
    archived log for thread 1 with sequence 32211 is already on disk as file /archives/CMOVP/stby/1_32211_810397891.arc
    archived log for thread 1 with sequence 32212 is already on disk as file /archives/CMOVP/stby/1_32212_810397891.arc
    archived log for thread 1 with sequence 32213 is already on disk as file /archives/CMOVP/stby/1_32213_810397891.arc
    archived log for thread 1 with sequence 32214 is already on disk as file /archives/CMOVP/stby/1_32214_810397891.arc
    archived log for thread 1 with sequence 32215 is already on disk as file /archives/CMOVP/stby/1_32215_810397891.arc
    archived log for thread 1 with sequence 32216 is already on disk as file /archives/CMOVP/stby/1_32216_810397891.arc
    archived log for thread 1 with sequence 32217 is already on disk as file /archives/CMOVP/stby/1_32217_810397891.arc
    archived log for thread 1 with sequence 32218 is already on disk as file /archives/CMOVP/stby/1_32218_810397891.arc
    archived log for thread 1 with sequence 32219 is already on disk as file /archives/CMOVP/stby/1_32219_810397891.arc
    archived log for thread 1 with sequence 32220 is already on disk as file /archives/CMOVP/stby/1_32220_810397891.arc
    archived log for thread 1 with sequence 32221 is already on disk as file /archives/CMOVP/stby/1_32221_810397891.arc
    archived log for thread 1 with sequence 32222 is already on disk as file /archives/CMOVP/stby/1_32222_810397891.arc
    archived log for thread 1 with sequence 32223 is already on disk as file /archives/CMOVP/stby/1_32223_810397891.arc
    archived log file name=/archives/CMOVP/stby/1_32196_810397891.arc thread=1 sequence=32196
    released channel: prm1
    released channel: stby1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 05/14/2013 01:11:33
    RMAN-05501: aborting duplication of target database
    RMAN-03015: error occurred in stored script Memory Script
    ORA-00283: recovery session canceled due to errors
    RMAN-11003: failure during parse/execution of SQL statement: alter database recover logfile '/archives/CMOVP/stby/1_32196_810397891.arc'
    ORA-00283: recovery session canceled due to errors
    ORA-00354: corrupt redo log block header
    ORA-00353: log corruption near block 2048 change 1638686297 time 05/13/2013 22:42:03
    ORA-00334: archived log: '/archives/CMOVP/stby/1_32196_810397891.arc'
    ################# What I did: ################################
    Rma target /
    RMAN>catalog archivelog '/archives/CMOVP/stby/1_32196_810397891.arc';
    The I connect to target and Auxiliary again :Rman target / catalog rman/rman@rman auxiliary
    and I run the last content of the failing memory script:RMAN> run
    set until scn 1638816629;
    recover
    standby
    clone database
    delete archivelog
    And The DB start the recovery Process and my Standby complete the recovery very weel with message "Recovery Finnish or Termintaed or Completed"
    The I could configure Datagurd
    And I check the process and the Log Apply was on and running fine, no gaps, perfect!!!!!
    How !!! Just Cataloging an "Supposed Corrupted"archive log !!!!!!
    If Any ideas, that ould be great to understand this.
    Rgds
    Carlos

    okKarol wrote:
    Hi Gurus,
    I've posted few days ago an issue I got while recreating my Dataguard.
    The Main issue was while duplicating target from active database I got this errors during the recovery process.
    The Restore Process Went fine, RMAN Copied the Datafiles very well, but stop when at the moment to start the recovery process from the auxiliary db
    Yesterday I took one last try,
    I follow same procedure, the one described in all Oracle Docs, Google and so on ... it's not a secret I guess.
    The I got the same issue, same errors.
    I read soemthing about archivelogs, and the Block corruption and so on, I've tried so many things (register the log... etc etc ), and than I read something about "catalog the logfile)
    and that's waht I did.
    But I was just connect to the target db.
    contents of Memory Script:
    set until scn 1638816629;
    recover
    standby
    clone database
    delete archivelog
    executing Memory Script
    executing command: SET until clause
    Starting recover at 14-MAY-13
    starting media recovery
    archived log for thread 1 with sequence 32196 is already on disk as file /archives/CMOVP/stby/1_32196_810397891.arc
    archived log for thread 1 with sequence 32197 is already on disk as file /archives/CMOVP/stby/1_32197_810397891.arc
    archived log for thread 1 with sequence 32198 is already on disk as file /archives/CMOVP/stby/1_32198_810397891.arc
    archived log for thread 1 with sequence 32199 is already on disk as file /archives/CMOVP/stby/1_32199_810397891.arc
    archived log for thread 1 with sequence 32200 is already on disk as file /archives/CMOVP/stby/1_32200_810397891.arc
    archived log for thread 1 with sequence 32201 is already on disk as file /archives/CMOVP/stby/1_32201_810397891.arc
    archived log for thread 1 with sequence 32202 is already on disk as file /archives/CMOVP/stby/1_32202_810397891.arc
    archived log for thread 1 with sequence 32203 is already on disk as file /archives/CMOVP/stby/1_32203_810397891.arc
    archived log for thread 1 with sequence 32204 is already on disk as file /archives/CMOVP/stby/1_32204_810397891.arc
    archived log for thread 1 with sequence 32205 is already on disk as file /archives/CMOVP/stby/1_32205_810397891.arc
    archived log for thread 1 with sequence 32206 is already on disk as file /archives/CMOVP/stby/1_32206_810397891.arc
    archived log for thread 1 with sequence 32207 is already on disk as file /archives/CMOVP/stby/1_32207_810397891.arc
    archived log for thread 1 with sequence 32208 is already on disk as file /archives/CMOVP/stby/1_32208_810397891.arc
    archived log for thread 1 with sequence 32209 is already on disk as file /archives/CMOVP/stby/1_32209_810397891.arc
    archived log for thread 1 with sequence 32210 is already on disk as file /archives/CMOVP/stby/1_32210_810397891.arc
    archived log for thread 1 with sequence 32211 is already on disk as file /archives/CMOVP/stby/1_32211_810397891.arc
    archived log for thread 1 with sequence 32212 is already on disk as file /archives/CMOVP/stby/1_32212_810397891.arc
    archived log for thread 1 with sequence 32213 is already on disk as file /archives/CMOVP/stby/1_32213_810397891.arc
    archived log for thread 1 with sequence 32214 is already on disk as file /archives/CMOVP/stby/1_32214_810397891.arc
    archived log for thread 1 with sequence 32215 is already on disk as file /archives/CMOVP/stby/1_32215_810397891.arc
    archived log for thread 1 with sequence 32216 is already on disk as file /archives/CMOVP/stby/1_32216_810397891.arc
    archived log for thread 1 with sequence 32217 is already on disk as file /archives/CMOVP/stby/1_32217_810397891.arc
    archived log for thread 1 with sequence 32218 is already on disk as file /archives/CMOVP/stby/1_32218_810397891.arc
    archived log for thread 1 with sequence 32219 is already on disk as file /archives/CMOVP/stby/1_32219_810397891.arc
    archived log for thread 1 with sequence 32220 is already on disk as file /archives/CMOVP/stby/1_32220_810397891.arc
    archived log for thread 1 with sequence 32221 is already on disk as file /archives/CMOVP/stby/1_32221_810397891.arc
    archived log for thread 1 with sequence 32222 is already on disk as file /archives/CMOVP/stby/1_32222_810397891.arc
    archived log for thread 1 with sequence 32223 is already on disk as file /archives/CMOVP/stby/1_32223_810397891.arc
    archived log file name=/archives/CMOVP/stby/1_32196_810397891.arc thread=1 sequence=32196
    released channel: prm1
    released channel: stby1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 05/14/2013 01:11:33
    RMAN-05501: aborting duplication of target database
    RMAN-03015: error occurred in stored script Memory Script
    ORA-00283: recovery session canceled due to errors
    RMAN-11003: failure during parse/execution of SQL statement: alter database recover logfile '/archives/CMOVP/stby/1_32196_810397891.arc'
    ORA-00283: recovery session canceled due to errors
    ORA-00354: corrupt redo log block header
    ORA-00353: log corruption near block 2048 change 1638686297 time 05/13/2013 22:42:03
    ORA-00334: archived log: '/archives/CMOVP/stby/1_32196_810397891.arc'
    ################# What I did: ################################
    Rma target /
    RMAN>catalog archivelog '/archives/CMOVP/stby/1_32196_810397891.arc';
    The I connect to target and Auxiliary again :Rman target / catalog rman/rman@rman auxiliary
    and I run the last content of the failing memory script:RMAN> run
    set until scn 1638816629;
    recover
    standby
    clone database
    delete archivelog
    And The DB start the recovery Process and my Standby complete the recovery very weel with message "Recovery Finnish or Termintaed or Completed"
    The I could configure Datagurd
    And I check the process and the Log Apply was on and running fine, no gaps, perfect!!!!!
    How !!! Just Cataloging an "Supposed Corrupted"archive log !!!!!!
    If Any ideas, that ould be great to understand this.
    Rgds
    CarlosHi,
    Can you change standby database archive destination from /archives/CMOVP/stby/ other disk?
    I think this problem on your disk.
    Mahir
    p.s. I remember you before thread, too

Maybe you are looking for

  • Automatic creation of MS Word Documents within a Report

    Dear Experts, within my report which creates automatically activities in a background process I have to create MS Word Documents and attach this Word Documents to the Activity. The Word Document does have a Logo and the text is changing with every Ac

  • Fact table data type changed from int to nvarchar -- rebuild on cube fails

     I change one of my data types in the Fact table from INT to Nvarchar... When I look at the properties it appears correct but when I try to Process it fails still thinking it's data type INT.  How can the DSV be refreshed( I did try REFRESH  and it n

  • Cannot get Ipod Touch 8 GB to update to newer software

    I have a 8 GB Ipod touch. The software version is currently 2.2.1. All of my apps will no longer sync to my Ipod because it says they require the Iphone 3.0 software update. I have tried to update my software several times, but it says I have the cur

  • Need library that lets me kill Windows programs and then reopen them.

    I have issues with a certain program crashing in remote locations..cough* VzAcess. I want to create a program that tries to ping a website and if that fails then it will kill the program and then re open the program. Everywhere I look line these thre

  • Businesscatalyst buggy Js and css cannot update any

    Its been a weird today , since i have updated the CSS and js but it doesnt reflect on the live site.Even though its pretty clear that the admin section has updated the files. In summary businesscatalyst today is a buggy one cannot update the site css