backup and recover tablespace:
after a full backup of database ,we delete the tablespace file.such as reporter.dbf
1. of cource we can restore database ,then tablespace is recovered.
restore database;
recover database;
2.In fact,we can recover tablespace from a full backup without backup of tablespace;
rman> sql 'alter tablespace reporter offline immediate';
rman> restore tablespace reporter;
rman> recover tablespace reporter;
rman> sql 'alter tablespace reporter online';
=====
RMAN> sql 'alter tablespace reporter offline immediate';
sql statement: alter tablespace reporter offline immediate
RMAN> restore tablespace reporter;
Starting restore at 15-NOV-09
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00006 to /opt/oracle/oradata/db/reporter.dbf
channel ORA_DISK_1: reading from backup piece /opt/orabak/0lkuep6d_1_1
channel ORA_DISK_1: restored backup piece 1
piece handle=/opt/orabak/0lkuep6d_1_1 tag=TAG20091115T221436
channel ORA_DISK_1: restore complete, elapsed time: 00:00:26
Finished restore at 15-NOV-09
RMAN> recover tablespace reporter;
Starting recover at 15-NOV-09
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:03
Finished recover at 15-NOV-09
RMAN> sql 'alter tablespace reporter online';
sql statement: alter tablespace reporter online
===
阅读(678) | 评论(0) | 转发(0) |