RMAN进行备份恢复(三)

2014-11-24 15:08:47 · 作者: · 浏览: 7
RMAN> alter database open;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 06/12/2013 14:14:14
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: '/home/oracle/oracle/product/10.2.0/oradata/orcl/system01.dbf'
--这里就需要使用归档日志进行介质恢复了:
RMAN> recover database;
Starting recover at 12-JUN-13
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:22
Finished recover at 12-JUN-13
--恢复成功:
RMAN> alter database open;
database opened
--另外RMAN还可以单独备份数据文件,数据库表空间:
BACKUP DATAFILE 3,4;--逗号隔开
BACKUP TABLESPACE XXX,XXX2;--逗号隔开
BACKUP CURRENT CONTROLFILE;
BACKUP SPFILE;
************************************************************************
--附录:关于scope=both的说明:
Question: I don't understand the scope=memory option. Does scope=memory only apply to SGA parameters
How is scope=memory different than a standard alter system command
Answer: scope is a parameter used in conjunction with the alter system command when you are changing any initialization parameter of an spfile.
It is vital to understand how to use this parameter to achieve the desired effect.
There are three values that the scope parameter can take:
scope = memory
scope = spfile
scope = both
For the value in question, scope = memory, Oracle will make the change specified by the alter system command for the life of the instance.
The next time the database is bounced, for any reason, the change will be reverted to the default value.
For scope=spfile the change made in the alter system command will take place starting from the next startup but will not affect the current instance.
If you want the alter system command to take place immediately you can use the scope = both value, which will make the change for the current instance and preserve it through any future bounces.'
************************************************************************