Chinaunix首页 | 论坛 | 博客
  • 博客访问: 69024
  • 博文数量: 15
  • 博客积分: 638
  • 博客等级: 上士
  • 技术积分: 155
  • 用 户 组: 普通用户
  • 注册时间: 2007-09-26 23:13
文章分类

全部博文(15)

文章存档

2012年(1)

2011年(1)

2009年(13)

分类: Oracle

2009-11-15 22:33:48

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) |
给主人留下些什么吧!~~