NBU 还原windows ORACLE数据库

发布时间:2017-7-1 10:45:46编辑:www.fx114.net 分享查询网我要评论
本篇文章主要介绍了"NBU 还原windows ORACLE数据库 ",主要涉及到NBU 还原windows ORACLE数据库 方面的内容,对于NBU 还原windows ORACLE数据库 感兴趣的同学可以参考一下。

run{
 allocate channel ch00 type 'SBT_TAPE';
 allocate channel ch01 type 'SBT_TAPE';
 send 'nb_ora_serv=nbumaster01';
 send 'nb_ora_client=zhnsdfp';
 restore  database
 until time "to_date('2017/06/07 11:16:41','yyyy/mm/dd hh24:mi:ss')";
 release channel ch00;
 release channel ch01;
}
--------------------------------
sqlplus / as sysdba

alter session set nls_date_format='YYYYMMDD HH24:MI:SS'; 
set linesize 160;
set pagesize;

select THREAD#,SEQUENCE#,FIRST_TIME,COMPLETION_TIME from v$archived_log 
where  COMPLETION_TIME>to_date('20170602 23:00:00','yyyymmdd hh24:mi:ss') 
and    COMPLETION_TIME<to_date('20170607 20:00:00','yyyymmdd hh24:mi:ss')
order by SEQUENCE#;


68305-68827

rman target /

恢复脚本
run{                                                        
allocate channel ch0 type 'SBT_TAPE';                       
allocate channel ch1 type 'SBT_TAPE';                      
send 'NB_ORA_CLIENT=zhnsdfp';                      
send 'nb_ora_serv=nbumaster01';                     
restore archivelog  sequence between 68305 and 68827;
release channel ch0;                                        
release channel ch1;                                       
}  

-----------------------
sqlplus / as sysdba

alter session set nls_date_format='YYYY/MM/DD HH24:MI:SS';
recover database until time '2017/06/07 11:16:41' using backup controlfile;

alter database open resetlogs;

二\恢复6月7日11:35分数据
shutdown immediate 后删除数据库文件和归档日志文件。
删除C:\app\fast_recovery_area\SEINEEBS\control02.ctl和C:\app\fast_recovery_area\SEINEEBS\ARCHIVELOG\2017_06_20

rman target /

startup nomount;

run{
 allocate channel ch00 type 'SBT_TAPE';
 send 'nb_ora_serv=nbumaster01';
 send 'nb_ora_client=zhnsdfp';
 restore controlfile from 'cntrl_984_1_946173555';
 release channel ch00;
}

alter database mount;

run{
 allocate channel ch00 type 'SBT_TAPE';
 allocate channel ch01 type 'SBT_TAPE';
 send 'nb_ora_serv=nbumaster01';
 send 'nb_ora_client=zhnsdfp';
 restore  database
 until time "to_date('2017/06/07 11:16:41','yyyy/mm/dd hh24:mi:ss')";
 release channel ch00;
 release channel ch01;
}

 

--------------------------------
sqlplus / as sysdba

alter session set nls_date_format='YYYYMMDD HH24:MI:SS'; 
set linesize 160;
set pagesize;

select THREAD#,SEQUENCE#,FIRST_TIME,COMPLETION_TIME from v$archived_log 
where  COMPLETION_TIME>to_date('20170602 23:00:00','yyyymmdd hh24:mi:ss') 
and    COMPLETION_TIME<to_date('20170607 20:00:00','yyyymmdd hh24:mi:ss')
order by SEQUENCE#;

---68305-68827

rman target /

恢复脚本
run{                                                        
allocate channel ch0 type 'SBT_TAPE';                       
allocate channel ch1 type 'SBT_TAPE';                      
send 'NB_ORA_CLIENT=zhnsdfp';                      
send 'nb_ora_serv=nbumaster01';                     
restore archivelog  sequence between 68305 and 68827;
release channel ch0;                                        
release channel ch1;                                       
}  

-----------------------

 

-----------------------
sqlplus / as sysdba

alter session set nls_date_format='YYYY/MM/DD HH24:MI:SS';
recover database until time '2017/06/07 11:35:00' using backup controlfile;

alter database open resetlogs;


上一篇:Android7.0中文文档(API)--
下一篇:(精)(递归遍历的延伸)交换二叉树的左右子树

相关文章

相关评论

本站评论功能暂时取消,后续此功能例行通知。

一、不得利用本站危害国家安全、泄露国家秘密,不得侵犯国家社会集体的和公民的合法权益,不得利用本站制作、复制和传播不法有害信息!

二、互相尊重,对自己的言论和行为负责。

好贷网好贷款