Databases Reference
In-Depth Information
CreatING aND FIXING BLOCK COrrUptION
the purpose of this sidebar is to show you how to corrupt a block so that you can test recovering at the block
level. Do not perform this test exercise in a production environment. in a linux/Unix environment, you can corrupt
a specific block in a data file using the dd command. for example, the following dd command populates the 20th
block of the tools01.dbf data file with zeros:
$ cd /u01/dbfile/o12c
$ dd if=/dev/zero of=tools01.dbf bs=8k conv=notrunc seek=20 count=1
you can validate the corruption via the validate command:
RMAN> validate tablespace tools;
you can now query the v$DataBaSe_BloCK_CorrUption view for details:
SQL> select * from v$database_block_corruption;
FILE# BLOCK# BLOCKS CORRUPTION_CHANGE# CORRUPTIO CON_ID
------- ---------- ---------- ------------------ --------- ----------
5 20 1 0 ALL ZERO 0
you can now use the rman recover command to restore block 20 in data file 5, as shown here:
RMAN> recover datafile 5 block 20;
you can now verify that the block corruption has been resolved by running a backup or a validate command.
Restoring Temporary Tablespaces
Problem
RMAN doesn't back up locally managed temporary tablespace tempfiles, and you want to ensure that they're restored
as part of your backup strategy.
Solution
Starting with Oracle Database 10 g , you don't have to restore or re-create missing locally managed temporary
tablespace tempfiles. When you open your database for use, Oracle automatically detects and attempts to re-create
locally managed temporary tablespace tempfiles.
When Oracle automatically re-creates a temporary tablespace, it will log a message to your target database
alert.log file similar to the following:
Re-creating tempfile <your temporary tablespace filename>
 
 
Search WWH ::




Custom Search