oracle数据库rman备份与还原

我是oracle 界的小白,由于公司领导要求,不得不硬着头皮在网上找rman备份还原的方法,废话不多说,具体看例子(window)

运行CMD;

rman target 管理员账号/密码@orcl

 

备份

run{
allocate channel d1 device type disk format 'F:\OracleBakupNew\switch40%u';
backup full database
include current controlfile
format 'F:/OracleBakupNew/bidhouse%U';
release channel d1;
}

 

还原
shutdown immediate;
startup mount;
reset database to incarnation 2;

restore database;
recover database until time "to_date('2016-04-29 15:10:25','yyyy/mm/dd hh24:mi:ss')";
alter database open resetlogs;

 

posted @ 2016-04-29 16:07  张三的编码生活  阅读(386)  评论(0编辑  收藏  举报