RMAN备份恢复实例

备份:

rman nocatalog target / 登录RMAN
show all; 看所有配置文件
CONFIGURE CONTROLFILE AUTOBACKUP ON; 开启RMAN
exit
rman target /
run{
2> allocate channel d1 type disk;
3> allocate channel d2 type disk;
4> backup full database format ‘/u02/rman/shiyueb0201104232334_%u.bak‘ tag=shiyuefull01;
5> release channel d1;
6> release channel d2;
7> }
恢复
sqlplus / as sysdba
startup                    说明下面查DBID号步骤是在open状态下的
select dbid from v$database;
desc v$database
删除控制文件、数据文件
rman target /
startup nomount
set dbid=*****
restore controlfile from autobackup;
alter database mount;
restore database;
recover database;
alter database open resetlogs;
alter database open;

你可能感兴趣的:(rman)