Handling Oracle Block Corruptions (Doc ID 28814.1)
Handling Oracle Block Corruptions (Doc ID 28814.1)
1) To Bottom
Applies to:
Oracle Database - Enterprise Edition - Version 7.0.16.0 to 12.1.0.2 [Release 7.0 to 12.1]
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A
and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Information in this document applies to any platform.
Purpose
Handling Oracle Block Corruptions in Oracle7/8/8i/9i/10g/11g/12c
Details
Contents
Introduction
Datafile Recovery ,
Database Recovery ,
Introduction
This article discusses how to handle one or more block corruptions on an Oracle datafile
and describes the main actions to take to deal with them. Please read the complete article
before taking any action.
This note does not cover memory corruption issues (typically ORA-600 [17xxx] type
errors).
Note: If the problem is an ORA-1578 on STARTUP then please contact Oracle Support
Services for advice.
This article can be referred from many places for many forms of error - it is important to
have the following information for each corrupt block:
For Oracle 7, 8.0 and 8.1 every tablespace in the database has the same block size.
For these versions, execute "SHOW PARAMETER DB_BLOCK_SIZE" and use
this value as the &TS_BLOCK_SIZE.
For other errors (ORA-600 , ORA-1498 etc...) the above values should either be given
by Oracle Support, or be given from the article which covers the relevant error.
Some errors, such as ORA-1410 "invalid ROWID" , ORA-12899 "value too large for
column" etc.., do not give details of the corrupt file / block. For such cases
Note:869305.1 may help in locating the corrupt row.
{go to content}
Overview of Steps to handle a Corruption
o
o Bad IO hardware / firmware
o OS problems
o Oracle problems
o Recovering through "UNRECOVERABLE" or "NOLOGGING" database
actions
(in which case ORA-1578 is expected behaviour - see below)
The point in time when an Oracle error is raised may be much later than when any
corruption initially occurred.
As the root cause is not usually known at the time the corruption is encountered, and as
in most cases the key requirement is to get up and running again, then the steps used
tackle corruption problems in this article are:
1. Determine the extent of the corruption problems and also determine if the
problems are permanent or transient.
For all steps above it is sensible to collect evidence and document exactly what
actions are being taken. The 'Evidence>>' tags in this article list the information
which should be collected to assist with identifying the root cause of the problem.
a.
a. Recovery cannot retrieve the NOLOGGING data
b. No data is salvagable from inside the block
b.
c. Solution
d. For Solution reference Note:794505.1
Reference Note 836658.1 for identifying the corruption extension. It is a good idea to
scan affected files (and any important files) with RMAN or DBVERIFY to check for
other corruptions in order to determine the extent of the problem. For details of using
DBVERIFY see Note:35512.1
Whenever a corruption error occurs note down the FULL error message/s and look in the
instance's alert log and trace files for any associated errors. It is important to do this first
to assess whether this is a single block corruption, an error due to an
UNRECOVERABLE operation or a more severe issue.
Once that a list of corrupt file/block combinations has been determined then the steps
below can be used to help in what action can be taken.
Evidence:
Record the original error in full, along with details of the application which
encountered the error.
Save an extract from the alert log from a few hours before the FIRST recorded
problem up to the current point in time.
Save any tracefiles mentioned in the alert log.
Record any recent OS problems encountered.
Note if using any special features - Example: ASYNC IO, fast write disk options
etc..
Record the current BACKUP position (Dates, Type etc...)
Note if the database is in ARCHIVELOG mode or not
g: Issue "ARCHIVE LOG LIST" in SQL*Plus (or Server Manager)
o Make sure the file to be relocated is either OFFLINE or the instance is in the
MOUNT state (not open)
o Physically restore (or copy) the datafile to its new location
example: /newlocation/myfile.dbf
o Tell Oracle the new location of the file.
example: ALTER DATABASE RENAME FILE '/oldlocation/myfile.dbf' TO
'/newlocation/myfile.dbf';
(Note that a TEMPFILE cannot be renamed - TEMPFILEs should be
dropped and recreated at the new location)
IMPORTANT: If there are multiple errors (which are NOT due to NOLOGGING)
OR There are OS level errors against the affected file
OR The errors are transient and keep moving about
then there is little point proceeding until the underlying problem has been addressed or
space is available on alternative disks.
Get the hardware vendor to check the system over and contact Oracle Support with details
of all errors.
Please note: Whilst a failed hardware check is a good indication that there is a hardware
issue, a successful hardware check should not be taken as proof that there is no hardware
related issue - it is very common for hardware tests to report success when there really is
some underlying fault.
If using any special IO options such as direct IO, async IO or similar it may be worth
disabling them in order to eliminate such options as a potential source of problems.
It is best to determine which objects are affected BEFORE making any decisions about
how to recover - this is because the corruption/s may be on object/s which can easily be
re-created.
Example: For a corruption on a 5 row lookup table it may be far quicker to drop and
recreate the table than to perform a recovery.
In Oracle8i/9i/10g:
In addition to the notes above about Oracle8, Oracle8i onwards can have
TEMPFILES. The following query will show the absolute and relative file numbers
for tempfiles in the database:
In Oracle 7: Use the same file number for both the "Absolute File#" and the "Relative
File#"
SELECT *
FROM dba_extents
WHERE file_id = &AFN
and &BL between block_id AND block_id + blocks - 1;
If the above query does not return rows, it can also be that the corrupted block is a
segment header in a Locally Managed Tablespace (LMT). When the corrupted block
is a segment header block in a LMT, the above query produces a corruption message
in the alert.log but the query does not not fail. In that case use this query:
{go to content}
The related objects and recovery options which can be used depend on the
SEGMENT_TYPE. The additional queries and possible recovery options are listed below
for each of the most common segment types
CACHE
CLUSTER
INDEX PARTITION
INDEX
LOBINDEX
LOBSEGMENT
ROLLBACK
TABLE PARTITION
TABLE
TEMPORARY
IOT
TYPE2 UNDO
Some other Segment Type
"no rows" from the query
CACHE
If the segment type is CACHE, recheck what have been entered and if the SQL /
parameters are correct.
Solution:
CLUSTER
Solution:
OR
Salvage data from all tables in the CLUSTER then recreate the CLUSTER and all its
TABLES. If the OWNER is "SYS" then contact Oracle support with all details.
As the CLUSTER may contain a number of TABLES, it is best to collect information for
each table in the cluster before making a decision.
{Collect TABLE information} {Back to Segment List}
INDEX PARTITION
If the segment is an INDEX PARTITION note the PARTITION NAME and OWNER and
then determine which partition is affected, example:
SELECT *
FROM dba_extents
WHERE file_id = &AFN AND &BL BETWEEN block_id AND block_id + blocks - 1
Solution:
OR
INDEX
Solution:
Repair the Block with RMAN Block Media Recovery
OR
Recreate the Index (with any associated constraint disables/enables). If the OWNER is
"SYS" then contact Oracle support with all details.
ROLLBACK
Solution:
TYPE2 UNDO
TYPE2 UNDO is a system managed undo segment which is a special form of rollback
segment. Corruptions in these segments require special handling.
Solution:
TABLE PARTITION
If the segment is a TABLE PARTITION note the NAME and OWNER and then determine
which partition is affected thus:
SELECT partition_name
FROM dba_extents
WHERE file_id = &AFN
AND &BL BETWEEN block_id AND block_id + blocks - 1;
Solution:
If all corruptions are in the same partition then one option at this point is to EXCHANGE
the corrupt partition with an empty TABLE - this can allow the application to continue
(without access to the data in the corrupt partition) whilst any good data can then be
extracted from the table.
For other options see the TABLE options below.
TABLE
If the OWNER is "SYS" then contact Oracle support with all details.
The database is likely to require recovery.
For a non-dictionary TABLE or TABLE PARTITIONs find out which iNDEXES exist on the
TABLE:
If there is a primary key then check if this is referenced by any foreign key constraints:
Solution:
OR
Salvage data from the TABLE (or PARTITION). If the OWNER is "SYS" then contact
Oracle support with all details.
The corruption in IOT table should be handled in the same way as in a heap or
partitioned table.
The only exception is if the PK (Primary Key) is corrupted.
PK of an IOT table is the table itself and cannot be dropped and recreated.
Solution:
OR
Salvage data from the TABLE (or PARTITION) and Methods of extracting data from a
corrupt table AROUND a corrupt block. If the OWNER is "SYS" then contact Oracle
support with all details.
THEN
Recreate the table (or partition)
OR
Leave the corruption in place
LOBINDEX
It is not possible to rebuild LOB indexes; treat the problem as a corruption on the LOB
column of the affected table.
Get index and constraint information for the table which has the corrupt LOB index using the
SQL in the TABLE section, then return here.
Solution:
Repair the Block with RMAN Block Media Recovery
OR
If the OWNER is "SYS" then contact Oracle support with all details.
LOBSEGMENT
Example:
SELECT table_name, column_name
FROM dba_lobs
WHERE owner='&OWNER'
AND segment_name='&SEGMENT_NAME';
Get index and constraint information for the table which has the corrupt LOB data using
the SQL in the TABLE section, then return here to find details of the exact rows affected.
Finding the exact row which references the corrupt LOB block can be a challenge as the
errors reported do not show any detail about which table row owns the lob entry which is
corrupt.
Typically one can refer to application logs or any SQL_TRACE or 10046 trace of a
session hitting the error (if available) or see if having
Eg:
ALTER SYSTEM SET EVENTS '1578 trace name errorstack level 3';
Then wait for the error to be hit by the application and find the trace file.
If there are no clues then there is the option to construct a PLSQL block to scan the
problem table row by row extracting the LOB column data which loops until it hits an
error. Such a technique may take a while but it should be possible to get a primary key or
rowid of any row which references a corrupt LOB block.
Example:
set serverout on
exec dbms_output.enable(100000);
declare
error_1578 exception;
pragma exception_init(error_1578,-1578);
n number;
cnt number:=0;
badcnt number:=0;
begin
for cursor_lob in
(select rowid r, &LOB_COLUMN_NAME L from &OWNER..&TABLE_NAME)
loop
begin
n:=dbms_lob.instr(cursor_lob.L,hextoraw('AA25889911'),1,999999) ;
exception
when error_1578 then
dbms_output.put_line('Got ORA-1578 reading LOB at '||cursor_lob.R);
badcnt:=badcnt+1;
end;
cnt:=cnt+1;
end loop;
dbms_output.put_line('Scanned '||cnt||' rows - saw '||badcnt||' errors');
end;
/
set serverout on
exec dbms_output.enable(100000);
declare
pag number;
len number;
c varchar2(10);
charpp number := 8132/2;
begin
for r in (select rowid rid, dbms_lob.getlength (<your_clob_column>) len
from <your_table_with_clcob_column>) loop
if r.len is not null then
for page in 0..r.len/charpp loop
begin
select dbms_lob.substr (<your_clob_column>, 1, 1+ (page * charpp))
into c
from <your_table_with_clcob_column>
where rowid = r.rid;
exception
when others then
dbms_output.put_line ('Error on rowid ' ||R.rid||' page '||page);
dbms_output.put_line (sqlerrm);
end;
end loop;
end if;
end loop;
end;
/
Solution:
OR
Update the lob column with empty_clob/empty_blob to avoid ORA-1578; this is cleaning
the LOB column in the table - note that the LOB is already corrupt and cannot be
accessed:
Setting the corrupt lob to empty lob will add the blocks formerly mapped to this lob
to the freelist. Eventually when PCTVERSION or RETENTION criteria causes the
space to be salvaged and reused for new data, error ORA-1578 can be seen again in
the same LOB blocks. In that case and after applying the above procedure the lob
segment can be moved to a new segment:
TEMPORARY
If the segment type is TEMPORARY then the corruption does not affect a permanent object.
Check if the tablespace where the problem occurred is being used as a TEMPORARY
tablespace thus:
Solution:
No restore is normally required, although if the disk is suspect and the tablespace
contains useful data then a database recovery of the affected file/s may be wise.
If the segment type returned is not covered above then contact Oracle support for advice with
all information collected so far.
If there appears to be no extent containing the corrupt block then first double check the
figures used in the query. If sure that the file and block are correct and do not appear as
belonging to an object in DBA_EXTENTS then:
Options:
If suspected that the block may be a space management block then use
DBMS_SPACE_ADMIN to help check this by running:
exec DBMS_SPACE_ADMIN.TABLESPACE_VERIFY('&TABLESPACE_NAME');
This should write inconsistencies to the trace file but if it encounters a fatally corrupt
block it will report an error like:
{go to content}
EVIDENCE
For each corrupt block it is also a good idea to collect the following physical evidence if there
is a need to try and identify the actual cause of the corruption:
1. An operating system HEX dump of the bad block and the block either side of it.
On UNIX:
On VMS:
DUMP/BLOCKS=(start:XXXX,end:YYYY)/out=dump.out &FILENAME
2. If the database is in ARCHIVELOG mode, make a safe copy of the archived log files
around the time of the error, and preferably for a few hours before the error was
reported. Also secure any backup/s of the problem datafile from before the errors as
the before image PLUS redo can help point towards a cause.
(DBV can often be used to check if the problem exists in a backup copy of a file). The
ideal scenario is to have a datafile backup image which does not have any corruption
and all the redo from that point in time up to and just past the time when the
corruption is first reported.
{go to content}
The best recovery option now depends on the objects affected. The notes in Section (3) above
should have highlighted the main options available for each affected object. The actual
recovery method chosen may include a mix or one or more methods thus:
Recovery Required ?
See Warnings
There is a good backup of the affected files. Note that in some cases, the corruption
may have been present, but undetected, for a long period of time. If the most recent
datafile backup still contains the corruption, try an earlier backup as long as all the
necessary ARCHIVELOGS are available.
(DBV with the START / END options can be used to check if specific block/s in a
restored copy of a backup file are corrupt)
All ARCHIVELOGS are available from the time of the backup to the current point in
time
The current online log/s are available and intact
The errors are NOT due to recovery through a NOLOGGING operation
When the above criteria are satisfied then complete recovery is usually the preferred
option
*BUT NOTE*
a. If the rollback of a transaction has seen a corrupt block on an object other than the
rollback segment itself then UNDO may have been discarded. In this case the indexes
may need to be rebuilt; check data integrity AFTER the recovery completes.
If database recovery has already been performed and the corruption is still there then
either all the backups contain the corruption, the underlying fault is still present or the
problem is replaying through redo. In these cases choose some other recovery option.
{go to content}
Can the object be Dropped or Re-created without needing to extract any data from the
object itself?
It may be possible to lose the object, or to recreate it from a script / recent export. Once an
object is dropped then blocks in that object are marked as "free" and will be re-formatted
when the block gets allocated to a new object. It is advisable to RENAME rather than DROP
a table unless absolutely sure that the data in it is not needed.
In the case of a table partition then only the affected partition needs to be dropped.
If the corruption affects the partition segment header, or the file containing the partition
header is offline, then DROP PARTITION may fail. In this case it may still be possible
to drop the partition by first exchanging it with a table of the same definition.
For any segment, a quick way to extract the DDL for an object, when the absolute file
number and block number of the corrupt block are known, is:
set long 64000
select dbms_metadata.get_ddl(segment_type, segment_name, owner)
FROM dba_extents
WHERE file_id=&AFN
AND &BL BETWEEN block_id AND block_id + blocks -1;
{go to content}
If the problem is on a critical application table which is regularly updated then it may be
required to salvage as much data from the table as possible, then recreate the table.
{go to content}
In some cases the best immediate option may be to leave the corruption in place and isolate it
from application access.
{go to content}
Last Options
Recovery to an old point-in-time (via point in time recovery)of either the database or
tablespace point in time recovery
{go to content}
If the database is in ARCHIVELOG mode and there is a good backup of the affected files
then recovery is usually the preferred option.
This is not GUARANTEED to clear a problem, but is effective for the majority of corruption
issues. If recovery re-introduces the problem then return to the list of options above and
choose another method.
If using Oracle9i (or higher) then it may be possible to perform block level recovery using the
RMAN BLOCKRECOVER command.
If using an earlier Oracle release then either perform a Datafile Recovery (which can be done
while the rest of the database is still up and running), or Database Recovery (which requires
the database to be taken down) .
If using Oracle 11g (or higher) then it may be possible to use Data Recovery Advisor.
As of Oracle9i RMAN allows individual blocks to be recovered whilst the rest of the database
(including other blocks in the datafile) are available for normal access. Note that block level
recovery can only be used to recover a block fully to the current point in time.
Example:
Consider having an ORA-1578 on file #6 block #30 which is likely due to a media
corruption problem and there is a good cold backup image of that file which has been
restored to '.../RESTORE/filename.dbf'.
Provided all archivelogs exist (in the default location) then RMAN can be used to
perform a Block Media Recovery (BMR) using a command sequence like:
rman nocatalog
connect target
catalog datafilecopy '.../RESTORE/filename.dbf';
run {blockrecover datafile 6 block 30;}
This uses the registered datafile backup image and any required archivelogs to perform
block recovery of just the one problem block to current point in time.
See the documentation for full details of the RMAN BLOCKRECOVER command and
limitations. See Note 144911.1 for an example and Note 342972.1 to perform Block
Media Recovery when backups are not taken by RMAN.
{go to content}
Datafile Recovery
Datafile recovery of a file involves the following steps. If there are several files repeat the
steps for each file or see "Database Recovery" below. These steps can be used if the database
is either OPEN or MOUNTED.
Assuming the restored file is OK, then RENAME the datafile to the NEW location (if
different from the old location)
{Continue}
{go to content}
Database Recovery
Check restored files with DBVERIFY. For details of using DBVERIFY see
Note:35512.1
STARTUP MOUNT
RECOVER DATABASE
Open the database:
{go to content}
Once a complete recovery has been performed it is advisable to check the database before
allowing it to be used:
Run:
If there has been any UNDO discarded this may show a mismatch requiring indexes to be re-
created.
Check the logical integrity of data in the table at the application level.
{go to content}
If the corrupt object is a user INDEX, simply drop and re-create it PROVIDED the underlying
table is not also corrupt.
If the underlying table is also corrupt it is advisable to sort out the TABLE before recreating
any indexes.
If the information collected shows that the index has dependent FOREIGN KEY constraints
then something like this may be needed:
Notes:
"ALTER INDEX ... REBUILD ONLINE" and "ALTER INDEX ... REBUILD
PARTITION ..."
do not build the new index from the old index segment and so can be used.
b. Create INDEX can use the data from an existing index if the new index is a sub-set of
the columns in the existing index. Hence if there are 2 corrupt indexes drop them
BOTH before re-creating them.
c. Be sure to use the correct storage details when recreating indexes.
{go to content}
Important:
As it may be required to salvage data in the corrupt block from the indexes it is a good idea
NOT to drop any existing index until any required data has been extracted
There are many ways to get data out of a table which contains a corrupt block. Choose the
most appropriate method as detailed below. The aim of these methods is to extract as much
data as possible from the table blocks which can be accessed. It is usually a good idea to
RENAME the corrupt table so that the new object can be created with the correct name.
1. From Oracle 7.2 onwards, it is possible to SKIP over corrupt blocks in a table.
This is the simplest option to extract table data and is discussed in:
Note that this method can only be used if the block "wrapper" is marked corrupt.
Example: If the block reports ORA-1578.
If the problem is an ORA-600 or other error which does not report and ORA-1578
error then it is often possible to use DBMS_REPAIR to mark the problem blocks in a
table as "soft corrupt" such that they will then signal ORA-1578 when accessed which
then allows to use DBMS_REPAIR.SKIP_CORRUPT_BLOCKS
Full details of using DBMS_REPAIR for this can be found in the documentation but
in summary the steps are:
Using ROWID Range Scans to extract data in Oracle8 and higher Note:61685.1
Using ROWID Range Scans to extract data in Oracle7 Note:34371.1
{go to content}
If the corrupt LOB block is NOT referenced by any row in the table then it should be possible
to CREATE TABLE as SELECT (CTAS) or export / drop / import the table as is.
If the corrupt LOB block is referenced by a row then it should be possible to select or export
with a WHERE predicate that excludes the problem row/s.
WARNING:
It is possible to update the LOB column value of a problem row to NULL (empty_blob() /
empty_clob) which will clear the ORA-1578 on SELECT operations *BUT* the corrupt
block will then be waiting to be reclaimed and will eventually signal an ORA-1578 on
attempts to get a new LOB for INSERT or UPDATE operations on any row which can be a
worse situation than having a corruption on a known row.
Hence the LOB column can be set to NULL only if intended to immediately recreate the
table.
Setting the corrupt lob to empty lob will add the blocks formerly mapped to this lob to the
freelist. Eventually when PCTVERSION or RETENTION criteria causes the space to be
salvaged and reused for new data, error ORA-1578 can be seen again in the same LOB
blocks. In that case and after applying the above procedure the lob segment can be moved to
a new segment:
alter table &table_owner.&table_with_lob move LOB (&&lob_column) store as
(tablespace &tablespace_name);
As the corrupt block itself is "corrupt" then any data extracted from the block should be
treated as suspect. The main methods of getting the rows from the corrupt block itself are:
Use any existing indexes on the table to extract data for columns covered by the index
where the ROWID falls inside the corrupt block. This is described towards the end of
the ROWID range scan articles mentioned above:
For Oracle8/8i see Note:61685.1
For Oracle7 see Note:34371.1
It may be possible to use LogMiner on the redo stream to find the original
inserts/updates which loaded the data to the problem block. The main factor here is
WHEN the data was actually put in the block.
example: row 2 may have been inserted yesterday but row 1 may have been inserted 5
years ago.
{go to content}
It is possible to leave a corruption in place and just accept the errors reported, or prevent
access to the problem rows at an application level.
Example: If the problem block / row is in a child table then it may be possible at application
level to prevent access via the parent row/s such that the child rows are never accessed. (Be
wary of cascade type constraints though)
This may not help with reports and other jobs which access data in bulk so it may also be
desirable to use the DBMS_REPAIR options shown in 4C above to prevent the block/s
erroring when accessed. Marking a corruption like this and leaving it around may give a short
term solution allowing full data salvage and/or recovery to be attempted at scheduled outage,
or allowing time to check other recovery options on a second (clone) database. Note though
that marking a block corrupt with DBMS_REPAIR.FIX_CORRUPT_BLOCKS will cause the
marked block/s to also be corrupt after recovery through the time that
FIX_CORRUPT_BLOCKS was executed.
Leaving a corruption may be sensible for data which rapidly ages and is subsequently purged
(example: In a date partitioned table where older partitions are dropped at some point).
At application level it can be possible to leave a corrupt LOB column in place until such time
as the table can be rebuilt.
One way to ensure to not hit the "WARNING" scenario above is to ensure that the table is
only ever accessed via a view which includes a WHERE predicate to prevent the problem
row/s from being seen.
example: Consider table MYTAB( a number primary key, b clob ) has one or more rows
pointing at corrupt LOB data.
If MYTAB is only accessed via MYVIEW, the row will never be visible and cannot be
updated; keeping the corrupt entry isolated until it can be dealt with.
Clearly this example is more of a design time solution but some applications may already
have similar mechanisms and may only access data via a view (or via an RLS policy) giving
some option/s to hide the problem rows.
{go to content}
Whilst it is possible to leave a corruption in place it should be noted that the corrupt blocks
will still show up in runs of DBVERIFY, in RMAN backup warnings / errors etc..
It is important to make a careful record of any corruption expected to be seen from these
tools, particularly any blocks expected to be skipped with RMAN (having MAX_CORRUPT
set) and be sure to remove any "acceptance" of the errors once the corruptions have been
cleared.
Example: Consider that a corrupt block has been handled by leaving the corruption in place
and avoiding the problem row/s at application level.
RMAN may be configured to allow the corruptions during backup.
The table is then recreated at a later date during some table reorganisation.
If RMAN is not updated to reflect that no errors should now be expected then RMAN may
ignore some other corruption which occurs at a later time.
It is also important to note that leaving corrupt blocks around in table segments can lead to
mismatched results from queries; different results can occur for tables with SKIP_CORRUPT
set depending on whether an index scan or table access occurs. Other reports may just error .
Note that leaving a corruption in place but marking the block with
DBMS_REPAIR.FIX_CORRUPT_BLOCKS writes redo to corrupt the block which may
limit subsequent recovery options.
{go to content}
A "vital" datafile has been lost (or have a corruption on it) and have no good
backup of the problem file/s (without the corruption)
The database is either not in ARCHIVELOG mode OR do not have all
archivelogs since the file was first created
Complete recovery keeps reintroducing the problem
Last chance:
Please note that if all copies of a datafile have been lost but DO still have the
ARCHIVE logs from when the file was first created it is still possible to recover the
file.
Example:
ALTER DATABASE CREATE DATAFILE '....' [as '...'] ;
RECOVER DATAFILE '....'
ALTER DATABASE DATAFILE '....' ONLINE;
If currently in this scenario try to recover the datafile using these steps before
proceeding below.
If reached this line there are no options left to recover to the current point in time. It
is advisable to shutdown the instance and take a BACKUP of the current database
NOW in order to provide a fall-back position if the chosen course of action fails.
(Example: if identified that the backup is bad).
Set up a clone database from a COLD backup and extract (export) the problem
table/s or transport the problem tablespace
Example: Restore the system tablespace and problem tablespace datafiles only to a totally
different location and/or machine as a different instance to investigate how far the database
can roll forward etc..
As of Oracle9i the "Trial Recovery" option can be used to save having to keep restoring a
backup while looking into possible options.
{go to content}
References
NOTE:1088018.1 - Master Note for Handling Oracle Database Corruption Issues
NOTE:1543698.2 - This document has been replaced with more recent information on this
topic. Please refer to more recent documentation.