Oracle9i Recovery Manager Reference
Release 1 (9.0.1)

Part Number A90136-02
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

RMAN Commands , 10 of 60


BLOCKRECOVER

Syntax


Text description of blockrec.gif follows
Text description of the illustration blockrec.gif

bmrBlockSpec::=


Text description of bmrblock.gif follows
Text description of the illustration bmrblock.gif

bmrOption::=


Text description of bmroptio.gif follows
Text description of the illustration bmroptio.gif

Purpose

Block media recovery recovers an individual data block or set of data blocks within a datafile. This type of recovery is useful if the data loss or corruption applies to a small number of blocks rather than to an entire datafile.

You can also use block media recovery to validate the integrity of redo generated after a backup. For example, you can do a trial-run block media recovery to detect problems in the archived redo stream.

Typically, block corruption is reported in Oracle error messages in trace files. Block-level data loss usually results from:

You need to specify the datafile number and block number or the tablespace and data block address (DBA) when executing the BLOCKRECOVER command, or use the CORRUPTION LIST keyword to recover all blocks reported in the V$BACKUP_CORRUPTION and V$COPY_CORRUPTION views.

See Also:

Oracle9i Recovery Manager User's Guide for concepts and Oracle9i Recovery Manager User's Guide for procedures 

Restrictions and Usage Notes

Keywords and Parameters

DEVICE TYPE deviceSpecifier 

Specifies the device type for the backup used in the block recovery.

See Also: "deviceSpecifier" 

bmrBlockSpec 

Specifies the data blocks that require recovery. 

 

DATAFILE datafileSpec 

Specifies a list of one or more datafiles that contain blocks requiring media recovery.

See Also: "datafileSpec" 

 

BLOCK integer 

Specifies the block number of the block requiring media recovery. Typically, the block number is obtained from error message output. 

 

TABLESPACE tablespace_name 

Specifies the tablespace name or number containing the corrupt blocks. 

 

DBA integer 

Specifies the data block address (DBA) of the corrupt block. 

 

CORRUPTION LIST 

Recovers all blocks listed in the V$BACKUP_CORRUPTION and V$COPY_CORRUPTION views. This view is populated by BACKUP (with or without the VALIDATE option), VALIDATE, and COPY. Two types of corruption result in rows added to these views:

  • Physical corruption (sometimes called media corruption). Oracle does not recognize the block at all: the checksum is invalid, the block contains all zeros, or the header and footer of the block do not match. Physical corruption checking is on by default, and can be turned off with the NOCHECKSUM option.

  • Logical corruption. The block has a valid checksum, the header and footer match, and so forth, but the contents are logically inconsistent. Logical corruption checking is off by default, and can be turned on with the CHECK LOGICAL option.

bmrOption 

Specifies various restore options relating to the block recovery. 

 

FROM BACKUPSET 

indicates that only backup set should be restored. 

 

FROM DATAFILECOPY 

indicates that only datafile image copies should be restored. 

 

FROM TAG = 'tag_name' 

indicates that only the backup set with the specified tag should be restored. 

 

RESTORE untilClause 

Specifies that only backups and copies created before the specified time, SCN, or log sequence number should be restored.

See Also: "untilClause" 

Examples

Recovering a Group of Corrupt Blocks: Example

This example recovers corrupt blocks in three datafiles:

BLOCKRECOVER DATAFILE 2 BLOCK 12, 13 DATAFILE 7 BLOCK 5, 98, 99 DATAFILE 9 BLOCK 19;

Limiting Block Media Recovery by Type of Restore: Example

The following example recovers a series of blocks and restores only from datafile copies:

RUN
{
  BLOCKRECOVER
    DATAFILE 3 BLOCK 2,3,4,5
    TABLESPACE sales DBA 4194405, 4194409, 4194412
  FROM DATAFILECOPY;
}

Limiting Block Media Recovery by Backup Tag: Example

This example recovers blocks and restores only from the backup set with the tag weekly_backup:

BLOCKRECOVER TABLESPACE SYSTEM DBA 4194404, 4194405 FROM TAG "weekly_backup";

Limiting Block Media Recovery by Time: Example

The following example recovers two blocks in the SYSTEM tablespace and forces the blocks to be restored from backups created at least two days ago:

BLOCKRECOVER TABLESPACE SYSTEM DBA 4194404, 4194405 RESTORE UNTIL TIME 'SYSDATE-2';

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback