RMAN Recover Clause

RMAN Recover Clause

Perform. media recovery from RMAN backups and copies.

Syntax:

   RECOVER [DEVICE TYPE deviceSpecifier [, deviceSpecifier]...] 
               recoverObject [recoverOptionList];

   recoverObject::=
     { DATABASE 
       [ untilClause
       | [untilClause] SKIP [FOREVER] TABLESPACE 
         ['] tablespace_name ['] [, ['] tablespace_name [']]...
       ]
     | TABLESPACE ['] tablespace_name ['] [, ['] tablespace_name [']]...
     | DATAFILE datafileSpec [, datafileSpec]...
     }

   recoverOptionList::=
     { DELETE ARCHIVELOG [MAXSIZE {integer [K | M | G]}]
     | CHECK READONLY 
     | NOREDO 
     | { FROM TAG | ARCHIVELOG TAG } [=] ['] tag_name [']
     .
     .
     .
     }...

Examples
Restore and recover the whole database
 RMAN> STARTUP FORCE MOUNT;
 RMAN> RESTORE DATABASE;
 RMAN> RECOVER DATABASE;
 RMAN> ALTER DATABASE OPEN;
 
Restore and recover a tablespace
 RMAN> SQL 'ALTER TABLESPACE users OFFLINE';
 RMAN> RESTORE TABLESPACE users;
 RMAN> RECOVER TABLESPACE users;
 RMAN> SQL 'ALTER TABLESPACE users ONLINE';

Restore and recover a datafile
 RMAN> SQL 'ALTER DATABASE DATAFILE 64 OFFLINE';
 RMAN> RESTORE DATAFILE 64;
 RMAN> RECOVER DATAFILE 64;
 RMAN> SQL 'ALTER DATABASE DATAFILE 64 ONLINE';

Steps for media recovery:

1. Mount or open the database.
Mount the database when performing whole database recovery, or open the database when performing online tablespace recovery.
2. To perform. incomplete recovery, use the SET UNTIL command to specify the time, SCN, or log sequence number at which recovery terminates. Alternatively, specify the UNTIL clause on the RESTORE and RECOVER commands.
3. Restore the necessary files with the RESTORE command.
4. Recover the datafiles with the RECOVER command.
5. Place the database in its normal state. For example, open it or bring recovered tablespaces online.

“Faith does not consist in the belief that we are saved; it consists in the belief that we are loved‚” - Alexandre Vinet

Related:

BACKUP - Back up database files, archive logs, backups, or copies.
CHANGE
- Update the status of a backup in the RMAN repository.
CONFIGURE
- Persistent RMAN settings.
CROSSCHECK
- Check whether backup items still exist.
LIST
- List backups and copies
REPORT
- Report backup status: database, files, backups
RESTORE
- Restore RMAN backups and copies.
RUN
- Some RMAN commands are only valid inside a RUN block.
SET
- Settings for the current RMAN session.
SHOW
- Display the current configuration

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23898243/viewspace-694024/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/23898243/viewspace-694024/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值