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

Similar Messages

  • Re: Block corruption in Undo tablespace

    undo_management                 
    string 
    MANUAL
    undo_tablespace                 
    string 
    UNDOTBS2
    SQL> alter database open;
    alter database open
    ERROR at line 1:
    ORA-01092: ORACLE instance terminated. Disconnection forced
    ORA-00704: bootstrap process failure
    ORA-00604: error occurred at recursive SQL level 2
    ORA-00376: file 3 cannot be read at this time
    ORA-01110: data file 3: '/u01/app/ora/oradata/undotbs01.dbf'
    Process ID: 5099
    Session ID: 96 Serial number: 7
    Anyone help me pls.

    undo_management                 
    string 
    MANUAL
    undo_tablespace                 
    string 
    UNDOTBS2
    SQL> alter database open;
    alter database open
    ERROR at line 1:
    ORA-01092: ORACLE instance terminated. Disconnection forced
    ORA-00704: bootstrap process failure
    ORA-00604: error occurred at recursive SQL level 2
    ORA-00376: file 3 cannot be read at this time
    ORA-01110: data file 3: '/u01/app/ora/oradata/undotbs01.dbf'
    Process ID: 5099
    Session ID: 96 Serial number: 7
    Anyone help me pls.

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

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

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

  • (oracle) block corruption

    Hi Everybody,
    Recently, my site has a development database that encountered block corruption in the system tablespace. I have verified this by using Oracle utility DBVERIFY on the system datafile.
    We have no backup at all for this development database. So database recovery from backup is impossible for us.
    I understand that there's a package called DBMS_REPAIR that can be used to repair corrupted blocks. I tried using this, but the process failed because it could not access the system tablespace (which is corrupted) to create a table used by the package.
    Does anyone know if I could overcome this problem and repair the corrupted blocks on the system tablespace?
    Also, I would like to understand what are the possible causes of block corruption. My site's Oracle Server and databases are installed on Windows 2000 platform.
    Please help answer my queries if you can. Thank you!
    null

    Iam sorry that I have not seen this posting until today .
    When there is a block corruption export will fail with error.
    The best method is to replace this file with a backup file and roll forward.
    null

  • Got data block corruption during DBCA

    dear all
    I'm getting block corruption in system.dbf file during databse creating using DBCA
    what's the reason?
    thanks
    John

    Your post contains insufficient information to work on.
    You need to provide
    - The four digit version of Oracle
    - the platform
    - What you were doing using dbca at the time of error
    - creating a database using of one the Oracle-provided templates
    - creating your own database
    Also you would need to specify whether you are using ASM or O/S provided filesystems and whether in the latter case you are observing physical errors on your disk.
    Sybrand Bakker
    Senior Oracle DBA

  • SYSTEM Tablespace corrupt blocks !!!!!!!!!

    Hi,
    Oracle version 10gR2 - 10.2.0.1.0
    The database which i am running in 10g is having few corrupt data blocks in system data files. I have no backup of full database and neither the database is in archive log mode. I know the situation of my development database has very less chance of getting to open mode.
    I have checked in metalink in for any hidden parameters, But my funny questions do u think there is any hidden parameter to get out of this issue. please suggest any metalink doc or any parameter to overcome this issue :-)
    Thanks
    Edited by: user11981262 on Dec 15, 2011 8:41 AM

    I don't know any helping secret parameter for you. As I see this your data is lost.
    What you can do is documented in [url https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doctype=BULLETIN&id=28814.1]Handling Oracle Block Corruptions in Oracle7/8/8i/9i/10g/11g ID 28814.1 Read carefully and try database recovery (from online logs)... submit your results here.

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

  • System tablespace gets corrupted.

    Hi,
    My system tablespace gets corrupted. My Database is not running in archivelog mode and also i dont have any backup. Is there is any solution to recover corrupted blocks in system tablespace;

    had the same few weeks ago at one of our customers
    SYSTEM tablespace (SYSTEM01.DBF) got corrupted due to power outage/disk error
    no archiving, no backup (database for testing purposes, which they update periodically with data from the production database)
    tried recovery (as Rafi suggested above), but it didnt work, it said SYSTEM01.DBF needs further recovery, thus open resetlogs wont work
    and it was right, resetlogs didnt work :)
    so the options:
    1. recovery/restore - not possible
    2. Oracle has a private tool called Oracle Data Unloader that can get the data from the datafiles - just a test database, doesnt worth the work/time/money
    3. open the database with the allowresetlogs_corruption=TRUE hidden parameter, and try a full export
    database could be opened with resetlogs by using this parameter
    the reward for this action: several ORA-600s per second, instance crashed in 30-60 seconds
    at the end we dropped the database and duplicated the production one

  • System block corrupted

    Hi,
    Database version: 10.2.0
    OS: Linux 5.4
    in my test databae One of the system datafile block is corrupted.
    I dont have rman backup for that test db.
    EXP-00008: ORACLE error 1578 encountered
    ORA-01578: ORACLE data block corrupted (file # 1, block # 50305)
    ORA-01110: data file 1: '/u01/app/oracle/oradata/rmct/system01.dbf'
    EXP-00000: Export terminated unsuccessfully
    I cannot recover that block. At least I want to take export of the schema which resides in non
    system tablespace.
    regards,

    What is the mode of your database.
    SQL> select log_mode from v$database ;
    If it is running in ARCHIVELOG, then you should be able to recover the corrupted block using RMAN
    Guide on how to do that using RMAN can be found at ..
    http://download.oracle.com/docs/cd/B12037_01/server.101/b10734/rcmconc2.htm#1006446
    You can also read the forum
    block level recovery
    If the database is running in NOARCH. then I am not sure but you have to repair the block before you can run import. You can use the DBMS_REPAIR package
    Refer the link for DBMS_REPAIR package details:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/repair.htm

  • System and sysaux file block corruption

    Errors in file /u01/app/oracle/diag/rdbms/pdent/pdent/trace/pdent_smon_3135.trc:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01578: ORACLE data block corrupted (file # 1, block # 91607)
    ORA-01110: data file 1: '/u01/app/oracle/oradata/pdent/system01.dbf'
    I am unable to take r man backup, as well as export using datapump. i tried to recover it using rman blockrecover but still same. here is detail
    SQL> SELECT * FROM V$DATABASE_BLOCK_CORRUPTION;
    FILE# BLOCK# BLOCKS CORRUPTION_CHANGE# CORRUPTIO
    1 91607 1 0 CHECKSUM
    2 58710 1 0 CHECKSUM
    5 1202316 1 0 CHECKSUM
    SQL> SELECT
    tablespace_name,
    segment_type,
    owner,
    segment_name
    FROM dba_extents
    WHERE file_id = 1
    AND BETWEEN block_id AND block_id + blocks - 1; 2 3 4 5 6 7 8
    TABLESPACE_NAME SEGMENT_TYPE OWNER
    SEGMENT_NAME
    SYSTEM INDEX SYS
    I_OBJ2
    alter system dump datafile 1 block 344;
    SQL> SELECT
    tablespace_name,
    segment_type,
    owner,
    segment_name
    FROM dba_extents
    WHERE file_id = 2
    AND 58710 BETWEEN block_id AND block_id + blocks - 1; 2 3 4 5 6 7 8
    TABLESPACE_NAME SEGMENT_TYPE OWNER
    SEGMENT_NAME
    SYSAUX INDEX PARTITION SYS
    WRH$_OSSTAT_PK
    SQL> ALTER INDEX I_OBJ2 REBUILD ONLINE;
    ALTER INDEX I_OBJ2 REBUILD ONLINE
    ERROR at line 1:
    ORA-00701: object necessary for warmstarting database cannot be altered
    need immediate help.
    thanks in advance

    user11914238 wrote:
    Errors in file /u01/app/oracle/diag/rdbms/pdent/pdent/trace/pdent_smon_3135.trc:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01578: ORACLE data block corrupted (file # 1, block # 91607)
    ORA-01110: data file 1: '/u01/app/oracle/oradata/pdent/system01.dbf'
    I am unable to take r man backup, as well as export using datapump. i tried to recover it using rman blockrecover but still same. here is detail
    SQL> SELECT * FROM V$DATABASE_BLOCK_CORRUPTION;
    FILE# BLOCK# BLOCKS CORRUPTION_CHANGE# CORRUPTIO
    1 91607 1 0 CHECKSUM
    2 58710 1 0 CHECKSUM
    5 1202316 1 0 CHECKSUM
    SQL> SELECT
    tablespace_name,
    segment_type,
    owner,
    segment_name
    FROM dba_extents
    WHERE file_id = 1
    AND BETWEEN block_id AND block_id + blocks - 1; 2 3 4 5 6 7 8
    TABLESPACE_NAME SEGMENT_TYPE OWNER
    SEGMENT_NAME
    SYSTEM INDEX SYS
    I_OBJ2
    alter system dump datafile 1 block 344;
    SQL> SELECT
    tablespace_name,
    segment_type,
    owner,
    segment_name
    FROM dba_extents
    WHERE file_id = 2
    AND 58710 BETWEEN block_id AND block_id + blocks - 1; 2 3 4 5 6 7 8
    TABLESPACE_NAME SEGMENT_TYPE OWNER
    SEGMENT_NAME
    SYSAUX INDEX PARTITION SYS
    WRH$_OSSTAT_PK
    SQL> ALTER INDEX I_OBJ2 REBUILD ONLINE;
    ALTER INDEX I_OBJ2 REBUILD ONLINE
    ERROR at line 1:
    ORA-00701: object necessary for warmstarting database cannot be altered
    need immediate help.
    Immediate help can be only provided by Oracle Support Services. So if you need that, please raise a Sev1 SR . For your issue, as others have suggested already, if you have a valid backup and you are in the archive log mode, using RMAN's BMR(Block Media Recovery) , the issue can be resolved provided there is nothing wrong with the hardware of yours. If that's the case, recovery wouldn't yield any benefits.
    Aman....

  • Block Corruption in the SYSAUX tablespace

    Problem Description: Block Corruption in the SYSAUX tablespace :
    ==================================
    We are facing block corruption issue in the SYSAUX tablespace during rman backup..
    So currently we are using SET MAXCORRUPT FOR DATAFILE 3 TO 2; parameter to take the backup and it is running fine.. Now we have to fix the issue..
    Please let us know the steps to fix the issue..
    Please find the details below.
    Dbv output:
    sesoxpro33.p51x1> dbv file=/oradata/p51x/data/p51x_sysaux_01.dbf blocksize=32768 end=64000
    DBVERIFY: Release 10.2.0.3.0 - Production on Fri Aug 26 20:47:29 2011
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    DBVERIFY - Verification starting : FILE = /oradata/p51x/data/p51x_sysaux_01.dbf
    Page 64 is influx - most likely media corrupt
    Corrupt block relative dba: 0x00c00040 (file 3, block 64)
    Fractured block found during dbv:
    Data in bad block:
    type: 0 format: 0 rdba: 0x00000000
    last change scn: 0x0000.00000000 seq: 0x0 flg: 0x00
    spare1: 0x0 spare2: 0x0 spare3: 0x0
    consistency value in tail: 0x00000001
    check value in block header: 0x0
    block checksum disabled
    DBVERIFY - Verification complete
    Total Pages Examined : 64000
    Total Pages Processed (Data) : 22547
    Total Pages Failing (Data) : 0
    Total Pages Processed (Index): 23859
    Total Pages Failing (Index): 0
    Total Pages Processed (Other): 14586
    Total Pages Processed (Seg) : 0
    Total Pages Failing (Seg) : 0
    Total Pages Empty : 3007
    Total Pages Marked Corrupt : 1
    Total Pages Influx : 1
    Highest block SCN : 281617057 (2054.281617057)
    SELECT tablespace_name, segment_type, owner, segment_name FROM dba_extents
    WHERE file_id = 3 and 64 between block_id AND block_id + blocks - 1;
    TABLESPACE_NAME SEGMENT_TYPE OWNER
    SEGMENT_NAME
    SYSAUX SYS_LOB0000000594C00007$$
    OS & database Details :
    ==========
    Oracle Solaris on x86-64 (64-bit)
    Oracle Server - Enterprise Edition -- 10.2.0.3
    If any more informatin is needed, Please let me know..
    Thanks & Regards,
    Suresh Bommalata.

    refer:
    logical corruption found in the sysaux tablespace
    Check the metalink note: Identify the corruption extension using RMAN/DBV/ANALYZE etc - 836658.1
    Note 28814.1 - Handling Oracle Block Corruptions in Oracle7/8/8i/9i/10g
    Note 472231.1 - How to identify all the Corrupted Objects in the Database reported by RMAN
    http://download.oracle.com/docs/cd/B12037_01/server.101/b10734/rcmrecov.htm
    http://oracleinstance.blogspot.com/2010/05/block-recovery-using-rman-backup.html

  • System datafile block corrupted

    hi there,
    i have got a serious problem, my database is in mount state, but when i try to start it up, it gives error datafile block corrupted file 'd:\path\system01.dbf'. these are backup file from last database, afer which os has been formated and reinstalled.
    these are files from oracle 9i R1 and i want to install it intom oracle 9i R2.is it ok or i have to install oracle 9i R1 for making database up?
    plz help what should i do???
    thanks and regards
    VD

    ya its true,
    its not consistent backup.its not RMAN backup.i just have files >DBF,controlfiles and redo log files.
    now i am asked to retrieve data from these files.i have rebuild the database, and mounted it.but it is not getting opened.
    if i use 'ALTER DATABASE OPEN RESETLOGS' it takes too much time but dosent open.
    thats the issue.
    SQL> ALTER DATABASE OPEN RESETLOGS;
    ALTER DATABASE OPEN RESETLOGS
    ERROR at line 1:
    ORA-01190: controlfile or data file 2 is from before the last RESETLOGS
    ORA-01110: data file 2: 'D:\ORACLE\ORADATA\ORACLE\UNDOTBS01.DBF'
    alert log file entry:-
    Mon Nov 17 15:59:49 2008
    ORA-1589 signalled during: ALTER DATABASE OPEN..
    Mon Nov 17 16:00:06 2008
    RESETLOGS after incomplete recovery UNTIL CHANGE 81553193
    Resetting resetlogs activation ID 0 (0x0)
    Mon Nov 17 16:00:21 2008
    Errors in file D:\ORACLE\admin\ORACLE\udump\ORA02204.TRC:
    ORA-01110: data file 2: 'D:\ORACLE\ORADATA\ORACLE\UNDOTBS01.DBF'
    ORA-01114: IO error writing block to file 2 (block # 1)
    ORA-27041: unable to open file
    OSD-04002: unable to open file
    O/S-Error: (OS 5) Access is denied.
    Mon Nov 17 16:00:22 2008
    now tell me what should i do??
    thanks and regards
    VD

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

  • 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

  • Help on block corruption (URGENT ...!)

    Hi all.
    I have a Oracle 10g Rel1 database on a linux box who is presenting block corruption at the system tablespace level.
    This database IS NOT in archive mode.
    Message says:
    ORA-01578: bloque de datos ORACLE corrupto (archivo numero 1, bloque numero *47132*)
    ORA-01110: archivo de datos *1: '/u01/oradata/BADAN1/BADAN1/system01.dbf'*
    This script is suppose to tell me which is the segment holding corrupted block:
    SQL> SELECT e.file_id,
    2 e.block_id,
    3 e.owner,
    4 e.segment_name,
    5 e.segment_type
    6 FROM dba_extents e
    7 WHERE
    8 file_id=1 and 47132 BETWEEN 47132 AND 47132 + blocks - 1
    9 /
    FROM dba_extents e
    ERROR at line 6:
    ORA-01578: ORACLE data block corrupted (file # 1, block # 47132)
    ORA-01110: data file 1: '/u01/oradata/BADAN1/BADAN1/system01.dbf'
    It seems base tables associated with dba_extents view are related in this case:
    select ds.owner, ds.segment_name, ds.partition_name, ds.segment_type,
    ds.tablespace_name,
    e.ext#, f.file#, e.block#, e.length * ds.blocksize, e.length, e.file#
    from sys.uet$ e, sys.sys_dba_segs ds, sys.file$ f
    where e.segfile# = ds.relative_fno
    and e.segblock# = ds.header_block
    and e.ts# = ds.tablespace_id
    and e.ts# = f.ts#
    and e.file# = f.relfile#
    and bitand(NVL(ds.segment_flags,0), 1) = 0
    and bitand(NVL(ds.segment_flags,0), 65536) = 0
    union all
    select /*+ ordered use_nl(e) use_nl(f) */
    ds.owner, ds.segment_name, ds.partition_name, ds.segment_type,
    ds.tablespace_name,
    e.ktfbueextno, f.file#, e.ktfbuebno,
    e.ktfbueblks * ds.blocksize, e.ktfbueblks, e.ktfbuefno
    from sys.sys_dba_segs ds, sys.x$ktfbue e, sys.file$ f
    where e.ktfbuesegfno = ds.relative_fno
    and e.ktfbuesegbno = ds.header_block
    and e.ktfbuesegtsn = ds.tablespace_id
    and e.ktfbuesegtsn = f.ts#
    and e.ktfbuefno = f.relfile#
    and bitand(NVL(ds.segment_flags, 0), 1) = 1
    and bitand(NVL(ds.segment_flags,0), 65536) = 0
    Please anybody advise on what to do ...!
    Regards, Luis ...!

    myluism wrote:
    Hi all.
    I have a Oracle 10g Rel1 database on a linux box who is presenting block corruption at the system tablespace level.
    This database IS NOT in archive mode.
    Message says:
    ORA-01578: bloque de datos ORACLE corrupto (archivo numero 1, bloque numero *47132*)
    ORA-01110: archivo de datos *1: '/u01/oradata/BADAN1/BADAN1/system01.dbf'*
    This script is suppose to tell me which is the segment holding corrupted block:
    SQL> SELECT e.file_id,
    2 e.block_id,
    3 e.owner,
    4 e.segment_name,
    5 e.segment_type
    6 FROM dba_extents e
    7 WHERE
    8 file_id=1 and 47132 BETWEEN 47132 AND 47132 + blocks - 1
    9 /
    FROM dba_extents e
    ERROR at line 6:
    ORA-01578: ORACLE data block corrupted (file # 1, block # 47132)
    ORA-01110: data file 1: '/u01/oradata/BADAN1/BADAN1/system01.dbf'That query doesn't look right to me. Try this:
    SELECT e.file_id,
    e.block_id,
    e.owner,
    e.segment_name,
    e.segment_type
    FROM dba_extents e
    WHERE
    file_id=1  and 47132 BETWEEN block_id  AND block_id + blocks - 1
    /Let us know the result of that query.
    -Mark

Maybe you are looking for

  • Duplicate Text At page split

    Hello Experts,    I am creating new adobe form and now i am stuck. I have long text in text ID field. I am using include module to pull the text. I have a main subform then i have line item subform then text element. if i have 5 lines in long text it

  • Viewing the printers memory

    Is it possible to view the printers memory content through the computer, or in any other way without having to actually print the whole memory content? I have a: HP Officejet 6500 E709n Thanks!

  • Printing fax page 1 stays on the screen

    Printing fax page 1 message stays on the printer - even if I shut it off or unplug it and turn it back on.  When shut off and turned back on, it prints the same page 1 again. I can't figure out how to erase this message. Carol

  • JQuery Functionality

    Has anyone seen a JQuery script that resembles the main image slider on this site? http://www.blazerformen.com/

  • Am unable to find a "reload" button for Firefox under Windows 7.

    Where is the Reload button?