RMAN Block Corruption
Hi,
i am using oracle 11g R1 database in windows 2003 server. i need to stimulate two scenario
1 . I want to corrupt a block and identify the corrupt block using RMAN.
2 . I need to corrupt a block and while taking backup using RMAN it should tell that the block is corrupt.
can anyone tell me how to do the above scenario
Regards,
007
007 wrote:
Hi,
i am using oracle 11g R1 database in windows 2003 server. i need to stimulate two scenario
1 . I want to corrupt a block and identify the corrupt block using RMAN.
2 . I need to corrupt a block and while taking backup using RMAN it should tell that the block is corrupt.
can anyone tell me how to do the above scenario
Regards,
007Check the link I've provided:
https://forums.oracle.com/forums/thread.jspa?messageID=9850924#9850924
Similar Messages
-
How to check & resolve block corruption if no RMAN backup is there?
*<<+MY Findings+>>*
to check block corruption :
(run command)
select * from v$database_block_corruption;
DB_VERIFY is useful in these situations:
When block corruption is expected;
Forecast any future problems w.r.t. database file/ block corruption;
When you restore files from a tape. It will help knowing if the first file pulled from tape is corrupt, instead of spending hours to extract all of them.
to check block corruption
DBVerify
C:\>dbv userid=nfadmin/nfadmin file=+DG1/nfdb/datafile/low_s_data.304.782536883 feedback=10000 blocksize=8192
can use DBMS_REPAIR to detect and repair corrupt blocks in tables and indexes
BEGIN
DBMS_REPAIR.admin_tables (
table_name => 'REPAIR_TABLE',
table_type => DBMS_REPAIR.repair_table,
action => DBMS_REPAIR.create_action,
tablespace => 'USERS');
DBMS_REPAIR.admin_tables (
table_name => 'ORPHAN_KEY_TABLE',
table_type => DBMS_REPAIR.orphan_table,
action => DBMS_REPAIR.create_action,
tablespace => 'USERS');
END;
Question* :::how to check & resolve block corruption if no RMAN backup is there?http://www.oracle.com/technetwork/database/focus-areas/availability/maa-datacorruption-bestpractices-396464.pdf
http://www.oracle-base.com/articles/misc/detect-and-correct-corruption.php -
Block corruption problem in alert and rman/dbv no show errors
Hello, I'm new in Oracle's world. I have one problem with Oracle 10.2.0.4 (RHEL 5.6) x64. Archive redo-log enable
In the alert.log, three days ago show (the server have kernel panic & rebooted):
Mon Sep 24 18:18:17 2012
Hex dump of (file 17, block 669888) in trace file xxxxxxxxxx.trc
Corrupt block relative dba: 0x044a38c0 (file 17, block 669888)
Bad check value found during buffer read
Data in bad block:
type: 6 format: 2 rdba: 0x044a38c0
last change scn: 0x0000.14eb5309 seq: 0x1 flg: 0x04
spare1: 0x0 spare2: 0x0 spare3: 0x0
consistency value in tail: 0x53090601
check value in block header: 0x6ea3
computed block checksum: 0x2
Reread of rdba: 0x044a38c0 (file 17, block 669888) found same corrupted data
Mon Sep 24 18:18:19 2012
Corrupt Block Found
TSN = 23, TSNAME = TABLE_TSD1
RFN = 17, BLK = 669888, RDBA = 71973056
OBJN = 86908, OBJD = 86908, OBJECT = SYS_C0040110, SUBOBJECT =
SEGMENT OWNER = SCHEMA1, SEGMENT TYPE = Index Segment
Yesterday, we detected this error because SQL don't execute.
The error repeat 47times and there is 6 different file-block combination (4 index of schemas, 1 of sys and ¡2 tables!)
First, I launched expdp and exp of the one problematic schema. The export was fine, no errors while exporting, but in the alert.log show one block corruption. Should exp and expd show error and stop?
Next, I used dbv and verify all dbfs. Only show 2 blocks error in two datafiles (indexes).
Next, I used RMAN:
A) check database: no error.
B) validate database: error in two blocks (logical error) and different from the 6 in alert.log. This two blocks are indexes.
I re-create this two indexes. When i re-create, the block error disappear (not inmediate, suppose that disappear when block was rewrite). Now dbv and rman show no error.
I have read one note about types of error, other about procedures if db is in archivelog/noarchivelog. Also if object is index or table. But I find anything about auto-repair corrupt blocks in Oracle or why now the 6 block error are solved. I don't know if two tables with two block corrupt lost rows or not.
Appreciate any help.
RegardsHello Fran. Result of query before rebuild problematic INDEXES:
SQL> select * from V$database_block_corruption;
FILE# BLOCK# BLOCKS CORRUPTION_CHANGE# CORRUPTIO
3 98857 1 390928740 LOGICAL
9 48632 1 390325900 LOGICAL
When I ran RMAN first time to check blocks, it filled V$database_block_corruption with two bad blocks. Different from the 6 errors from alert.:
RMAN> backup validate check logical database;
Error backing up file 9, block 48632: logical corruption
Error backing up file 3, block 98857: logical corruption
I extracted index name from each block and I re-created it. Also, I created a temporary table in tablespace's datafile to fill blocks empty. Problem solved. Rman / dbv show no error.
I'm searching for similar experiences and found: Re: Data in bad block
First 6 bad checksum errors in alert.log disappear with any visible problem?
Can I sure that DB is fine if RMAN and DBV show no errors?
Thank you very much
Edited by: user7755509 on 27-sep-2012 5:43 -
Hi
I know rman detect block corruption but my question is block corruption having two types one is physical block corruption and other is logical block corruption
by default rman enable physical block corruption but by default rman not able to detect logical block corruption.Plz tell how i enable logical block corruption with RMAN?
Please make correction if i m wrong.
Thanks a lot.>> Sorry i am not telling you i am using oracle 9iR2 instead of oracle 10g
It's okay.
That's why; it's been already told that before posting in the forums, better it's better to specify/mention the Oracle Version/OS Details, etc to get the accurate and response.
>> Send me if you have 9i related document.
No need to send you the related documents, when there is a bulk repository available for free of cost for everybody.
All you need to do is, just search in http://tahiti.oracle.com/ with the required word or phrase.
Don't take me wrong, but make a habit of searching related documents from the Oracle Documentations.
Regards,
Sabdar Syed. -
Logical Block corruption - not enough RMAN backups
I have to deal with logical block corruption but these guys do not have enough rman backups to go back enough to recover blocks.
All bad blocks are in SYSAUX and it seems because of it EM doesn't work as it's suppose to do. I dropped and recreated EM repository hoping it will clean itself but .... no.
Any ideas?
Oracle Linux 4.7 i386
Oracle 10.2.0.4OCCUPANT_NAME OCCUPANT_DESC SCHEMA_NAME MOVE_PROCEDURE MOVE_PROCEDURE_DESC SPACE_USAGE_KBYTES
EM Enterprise Manager Repository SYSMAN emd_maintenance.move_em_tblspc Move Procedure for Enterprise Manager Repository 52800
EM_MONITORING_USER Enterprise Manager Monitoring User DBSNMP *** MOVE PROCEDURE NOT APPLICABLE *** 1600 -
RMAN problem with block corruption
Hi
I have problem with the block corruption in one of the database .
here is the error message .
ora-01578:oracle data block corrupted (file# 10,block # 55309) ora-01110: data file 10:
'/db/gist1/data/gist1_gis_nologging_01.dbf' ora-26040: data block was loaded using the NOLOGGING option .
gisq SQL> select * from v$database_block_corruption;
FILE# BLOCK# BLOCKS CORRUPTION_CHANGE# CORRUPTIO
10 11 126 3754364971 LOGICAL
RMAN> blockrecover datafile 10 block 11;
Starting blockrecover at 14/DEC/2012 16:25:48
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of blockrecover command at 12/14/2012 16:25:48
RMAN-05009: Block Media Recovery requires Enterprise Edition
Could some one help me in providing solution for this . we we have standard addition only .
Thanks in advance ...It appears that there was a NOLOGGING operation on an object that resides in '/db/gist1/data/gist1_gis_nologging_01.dbf' .
NOLOGGING operations, as the name suggests, do generate limited redo log, which makes the objects affected by them non-recoverable.
RMAN Blockrecover, as far as I understand, uses full and archivelog backup to perform the block recovery. Since the archivelog backup does not store any changes related to the NOLOGGING operation, then Blockrecover would not be able to help you even if you were licensed.
You can try to restore the object as of the most recent full backup…
Iordan Iotzov
http://iiotzov.wordpress.com/ -
Block corruption detection in RMAN.
Hi,
I'd be be grateful if anyone could confirm or clarify the behaviour of the RMAN backup command with regard to detecting corrupt blocks in the datafiles.
The environment is as follows:
10.2.0.5.1
Solaris 10
2 node RAC
Block Change Tracking file is not used.
DB_BLOCK_CHECKING=OFF
DB_BLOCK_CHECKSUM=OFF
Does the BACKUP DATABASE command check both physical and logical block corruptions when run either as a full backup or incremental?
I'm trying to establish wether running a BACKUP _VALIDATE [CHECK LOGICAL]_* DATABASE on a nightly basis provides any value if the same checks are being performed by the standard backup commands that are already scheduled every night?
Any input appreciated.
ThanksHi,
By default, RMAN just check for physical corruption, either in full or incremental backups. To check logical corruption you have to use the command "backup check logical;".
About the parameter DB_BLOCK_CHECKSUM, its default is TRUE and Oracle Corporation advises leaving this parameter on default, so that any damage caused while the block is on disk, or corruptions introduced during the write and read process, will be detected.
Hope it help.
Regards, -
Hi,
If Rman identify corrupt block while performing a backup of the archive logfiles, it failover to an existing intact copy...wht does tht mean...If there is no copy available then RMAN backup fails. You can override this by using skip inaccessible option with backup command.
RMAN > BACKUP DATABASE PLUS ARCHIVELOG SKIP INACCESSIBLE; OR
rman > BACKUP ARCHIVELOG ALL SKIP INACCESSIBLE;
BUT this compromises sthe database recovery as missed archivelog file is not present is the backup. The SKIP INACCESSIBLE option just asks the RMAN to continue the backup if an archivelog is missing . This completes the backup of all other datafiles, archivelog files , controlfiles . The backup will not fail in this case. -
How RMAN detect block corruption
Hi,
how RMAN detect block corruption( means how RMAN work internally to find corrupted block).
thanks.There are initialization parameters (like DB_BLOCK_CHECKING) which will detect block corruption on block access. Go through the following link also:
http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmconc1.htm -
How to overcome Block corruption using RMAN
Hi All,
How to overcome bolck corruption using RMAN. What is the procedure to do so.
Thanks & Regards
J.VenugopalHi all,
I´ve performed the following command on RMAN:
RMAN> BACKUP VALIDATE CHECK LOGICAL DATABASE ARCHIVELOG ALL;After, I query the V$DATABASE_BLOCK_CORRUPTION table, and the below records
was returned:
FILE# BLOCK# BLOCKS CORRUPTION_CHANGE# CORRUPTIO
67 4670 1 1202832866 LOGICAL
68 154131 338 1175601952 LOGICAL
68 155329 60 1174783128 LOGICAL
68 155409 60 1174783132 LOGICAL
68 155471 78 1174783135 LOGICAL
68 155551 78 1174783139 LOGICAL
68 155631 18 1174783143 LOGICAL
68 155651 18 1174783144 LOGICAL
68 155671 18 1174783145 LOGICAL
68 155691 18 1174783146 LOGICAL
68 155711 18 1174783147 LOGICAL
68 155731 18 1174783148 LOGICAL
68 155751 18 1174783149 LOGICAL
68 155771 78 1174783150 LOGICAL
68 155851 78 1174783154 LOGICAL
68 155931 49 1174783158 LOGICAL
73 165758 1 1180191676 LOGICALSo, when I try to recover these blocks by using blockrecover command, I got the error:
RMAN> blockrecover corruption list;
Starting blockrecover at 27-SEP-07
using channel ORA_DISK_1
using channel ORA_DISK_2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of blockrecover command at 09/27/2007 10:22:10
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 73 found to restore
RMAN-06023: no backup or copy of datafile 68 found to restore
RMAN-06023: no backup or copy of datafile 67 found to restoreWhat can I do in this case?
Thank U very much!
[]´s -
Oracle 11g: Block Corruption in SYSAUX File
Hello All,
I am facing Data corruption issue in the SYSAUX file.
We are using Oracle 11G (Microsoft 32 bit) and our system is running in noarchivelog mode.
Following are the errors in the alert log.
e:\sc\sc15.2\databases\oracleconfig\diag\rdbms\enmscsdb\nm45\trace\nm45_p000_5944.trc
Corrupt block relative dba: 0x0088a9f8 (file 2, block 567800)
Fractured block found during buffer read
Data in bad block:
type: 6 format: 2 rdba: 0x0088a9f8
last change scn: 0x0000.0b3bb7c7 seq: 0x1 flg: 0x04
spare1: 0x0 spare2: 0x0 spare3: 0x0
consistency value in tail: 0xc7000601
check value in block header: 0xee6b
computed block checksum: 0x72c6
Reread of rdba: 0x0088a9f8 (file 2, block 567800) found same corrupted data
Thu Jan 22 16:46:44 2009
SMON: Restarting fast_start parallel rollback
SMON: ignoring slave err,downgrading to serial rollback
ORACLE Instance nm45 (pid = 12) - Error 1578 encountered while recovering transaction (9, 11) on object 458.
Errors in file e:\sc\sc15.2\databases\oracleconfig\diag\rdbms\enmscsdb\nm45\trace\nm45_smon_6492.trc:
ORA-01578: ORACLE data block corrupted (file # 2, block # 567800)
ORA-01110: data file 2: 'E:\SC\SC15.2\DATABASES\ORACLECONFIG\SYSAUXNM45.ORA'
Thu Jan 22 16:46:45 2009
Trace dumping is performing id=[cdmp_20090122164645]
Corrupt Block Found
TSN = 1, TSNAME = SYSAUX
RFN = 2, BLK = 567800, RDBA = 8956408
OBJN = 458, OBJD = 458, OBJECT = I_WRI$_OPTSTAT_HH_OBJ_ICOL_ST, SUBOBJECT =
SEGMENT OWNER = SYS, SEGMENT TYPE = Index Segment
Following query indicates the corruption is in index.
SQL> SELECT tablespace_name, segment_type, owner, segment_name FROM dba_extents
WHERE file_id = 2 and 567800 between block_id AND block_id + blocks - 1;
TABLESPACE_NAME SEGMENT_TYPE OWNER
SEGMENT_NAME
SYSAUX INDEX SYS
I_WRI$_OPTSTAT_HH_OBJ_ICOL_ST
==============
DBverify output:
==============
E:\SC\SC15.2\Databases\OracleConfig>dbv file=SYSAUXNM45.ORA blocksize=8192
DBVERIFY: Release 11.1.0.7.0 - Production on Thu Jan 22 16:59:11 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
DBVERIFY - Verification starting : FILE = E:\SC\SC15.2\Databases\OracleConfig/SY
SAUXNM45.ORA
DBV-00200: Block, DBA 8956312, already marked corrupt
Page 567800 is influx - most likely media corrupt
Corrupt block relative dba: 0x0088a9f8 (file 2, block 567800)
Fractured block found during dbv:
Data in bad block:
type: 6 format: 2 rdba: 0x0088a9f8
last change scn: 0x0000.0b3bb7c7 seq: 0x1 flg: 0x04
spare1: 0x0 spare2: 0x0 spare3: 0x0
consistency value in tail: 0xc7000601
check value in block header: 0xee6b
computed block checksum: 0x72c6
DBVERIFY - Verification complete
Total Pages Examined : 1623864
Total Pages Processed (Data) : 540984
Total Pages Failing (Data) : 0
Total Pages Processed (Index): 964944
Total Pages Failing (Index): 0
Total Pages Processed (Other): 17849
Total Pages Processed (Seg) : 0
Total Pages Failing (Seg) : 0
Total Pages Empty : 100086
Total Pages Marked Corrupt : 2
Total Pages Influx : 1
Total Pages Encrypted : 0
Highest block SCN : 190789648 (0.190789648)
SQL> select * from v$database_block_corruption;
FILE# BLOCK# BLOCKS CORRUPTION_CHANGE# CORRUPTIO
2 567800 1 0 FRACTURED
2 567704 1 0 FRACTURED
How to resolve this issue.
Thanks
With Regards
Hemant Joshi.Drop and re-creating the index would be better than re-building the index.
Check the metalink note: Identify the corruption extension using RMAN/DBV/ANALYZE etc - 836658.1
Note 28814.1 - Handling Oracle Block Corruptions in Oracle7/8/8i/9i/10g
Note 472231.1 - How to identify all the Corrupted Objects in the Database reported by RMAN
ORA-1578 Main Reference Index for Solutions -830997.1 -
Need advice on ORA-01578: ORACLE data block corrupted
We have a development database server version- 10.2.0.3 with materialized views refresh as complete every morning. Yesterday we had a power failure and the server went down and database was shutdown unexpectedly.
When we restarted the database after the server restarted, we found some of the datablocks got corrupted . Following were the exceptions that we saw in the alert.log.
Errors in file /i01_01/app/oracle/product/10.2.0/db_1/admin/orcl9/bdump/orcl9_smon_7547.trc:
ORA-01578: ORACLE data block corrupted (file # 11, block # 257712)
ORA-01110: data file 11: '/i01_01/app/oracle/product/10.2.0/oradata/orcl9/ts_gen_data_02.dbf'
ORACLE Instance orcl9 (pid = 8) - Error 1578 encountered while recovering transaction (9, 38) on object 54463
I tried the following query to see the segment type.
select owner, segment_name, segment_type from dba_extents where file_id =11 and 257712 between block_id and block_id + blocks - 1;
OWNER
SEGMENT_NAME
SEGMENT_TYPE
VISH
INVENTORY_TXN
TABLE
where " INVENTORY_TXN " is a materialized view that was using the block that got corrupted. I can always recreate the MV by dropping and recreating it. Will it solve the problem???
If not, how can I recover/repair the block.???
Can anyone advice on this. Thanks very much in advance.To recover a corrupted block,the best way out is to use Blockrecover command of RMAN. So you would need RmAN backup to perform the operation.But first ypu you need to ensure that this is a persistent error or not? Is this error is coming repeatedly or just once it happened?
About Blockrecover command,read here,
http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmrecov005.htm#BRADV157
HTH
Aman.... -
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
StefanThanks Sybrand,
Agree with your first two suggestions .
Also scheduled a expdp job tonight. (Only backup like thing they had was a expdp cron, but until today all the large tables were failing due to small undo_retention).
Yes. Flashback is not used. So hopefully it will not affect the a database restart i guess?
Related to dbms_repair, I was referring to - http://askdba.org/weblog/2010/08/physical-corruption-ora-1578-part-3/.
Where DBMS_REPAIR.FIX_CORRUPT_BLOCKS and DBMS_REPAIR.SKIP_CORRUPT_BLOCKS used.
Which i think will not use any redo.
Thanks
Stefan -
Oracle 11g - How to repair block corruption(on free space) in datafile
Hi,
I have a tablesopace with 3 datafiles, out of which one datafile has corrupted block. But no objects or data is affected as the corrupted block os in free space. This was shown in the alert logs.
Please see below the details:
Wed Apr 06 15:30:04 2011
SMON: Restarting fast_start parallel rollback
SMON: ignoring slave err,downgrading to serial rollback
ORACLE Instance geooap (pid = 12) - Error 1578 encountered while recovering transaction (10, 6) on object 149755.
Errors in file f:\oracle11g\diag\rdbms\geooap\geooap\trace\geooap_smon_5540.trc:
ORA-01578: ORACLE data block corrupted (file # 7, block # 54053)
ORA-01110: data file 7: 'F:\ORACLE11G\ORADATA\GEOOAP\ORDER_DATA_01.DBF'
GEOAP:
Fri Apr 01 14:57:48 2011
Errors in file f:\oracle11g\diag\rdbms\geop\geop\trace\geop_arc1_2156.trc:
ORA-00235: control file read without a lock inconsistent due to concurrent update
Fri Apr 01 14:57:58 2011
================================================================
The corruption is being reported in a free space block of the ORDER_DATA_01.DBF.
I’ve checked all the tables (and indexes) in this tablespace and none report corruption.
=====================================================Is there any action I need to take to remove corruption at this point?It is not affected any operation on the database yet.
What is the best way to do get rid of the corrupt block, without dropping and rebuillding the full tablespace(which is around 6 GB -total of 3 datafiles)
Thanks a lotCan RMAN recover the datablock from this cold backup(which is a week old, the data file was not corrupted then) ?Please note that to do the recovery, you would need the backup and the archivelog files since the backup. Think about what you are asking to do. Its a single block whose recovery you are asking from a week old backup which obviously would be on an much older SCN compared to the rest of the database. How would you make that block consistent with the rest of the datafile. If you don't have archivelog in that db whose block is corrupted, you may forget that block and any data that it might ever had. Also, please read the documentation about the block recovery which explains the requirements very clearly,
http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmblock.htm#BRADV89784
From the above link, 1st point,
The target database must run in ARCHIVELOG mode and be open or mounted with a current control file.HTH
Aman.... -
I'm on 9i R2 Patch 7 on a Microsoft Windows Server 2003.
How do you fix data block corruption in a Table?
Is the some way to retrieve the data from the Table drop it then recreate and reimport the data?
or do you have to succumb with restoring the Database from the last known good backup?Hey, you can do the BMR (Block Media Recovery).
Since block corruption is to few subsets of blocks, i.e. a single table, you dont need to restore from the previous valid backup, you can simply do the following to achieve BMR.
Connect to rman and run the following:
run{ backup validate database};
Once the above commend is finishes, exit from RMAN and connect to the database as / as sysdba and use the following view to know the details required for BMR.
select * from V$backup_corruption;
The above queries gives you file# and block# information. Once you have the information do the BMR using following command at the RMAN prompt:
run {blockrecover datafile # block #};
# : indicated the datafile number and block number from the above view.
Let me know if you have any further issues.
You can also use view V$DATABASE_BLOCK_CORRUPTION to view the file# and corrupted blocks information.
Jaffar
Maybe you are looking for
-
My iphone camera app is no longer on the screne
The Camera App on my Iphone 4S is no longer on the screne? How can I replace it?
-
Connect imac 24 " as a second display ?
can i use imac 24 " as a second display to an other imac??i am having little confused here.. it can be possible on 27" imacs but i am not sure that is possible on 24 " imac..p lease help?
-
Hi, How can I get the values of selected rows / columns when more than 1 at a time? Wha I need is the following: cell. What I am looking for is the values of multiple cells as follows: Col1 Col2 Col3 Col4 Col5 row1 A B C D E row2 F G H I J row3 K L M
-
Applying color to the line in a linechart while using a JFreeChart
hi I had created a line chart using a JFreeChart.It had given its default color to the line,I want to modify the color of the line.How should i do it?
-
Repeated 'mac OS X wants to make changes' prompt
In the last few days, I have started seeing a really annoying problem. Some apps (e.g. Shrook) have now started displaying the prompt Mac OS X wants to make changes. Type an administrator's name and password to allow this. Mac OS X wants to use the