文章详情

短信预约-IT技能 免费直播动态提醒

请输入下面的图形验证码

提交验证

短信预约提醒成功

oracle rman 跨版本恢复 11.2.0.3- 11.2.0.4

2024-04-02 19:55

关注

   1.切换归档,执行rman全库备份
   2.传送的服务器上。
   3.对其进行恢复  --创建对应的目录  
     1.修改配置文件,按比例修改配置参数
     根据这些目录更改创建对应的目录
     mkdir -p /home/opt/oracle/diag/rdbms/wms/wms
     mkdir -p /home/opt/oracle/diag/rdbms/wms/wms/trace
     mkdir -p /home/opt/oracle/diag/rdbms/wms/wms/alert
     mkdir -p /home/opt/oracle/diag/rdbms/wms/wms/incident
     mkdir -p /home/opt/oracle/diag/rdbms/wms/wms/cdump
     mkdir -p /home/opt/oracle/diag/rdbms/wms/wms/hm
     mkdir -p /home/opt/oracle/admin/wms/adump
     mkdir -p /home/opt/oracle/admin/wms/pfile
     mkdir -p /home/opt/oracle/admin/wms/dpdump
     mkdir -p /home/upt/oracle/oradata/wms
     mkdir -p /home/upt/oracle/fast_recovery_area/wms
     mkdir -p /home/upt/oracle/arch
     2.写rman恢复脚本
   4.对对象和数据进行校验   
restore controlfile from '/home/upt/data/20150920235901/wms_full_20150920235901_c-324000772-20150921-01';
sql 'alter database mount';
catalog start with '/home/upt/data/20150920235901';
run{
set newname for datafile 1  to '/home/upt/oracle/oradata/wms/system01.dbf';
set newname for datafile 2  to '/home/upt/oracle/oradata/wms/sysaux01.dbf';
set newname for datafile 3  to '/home/upt/oracle/oradata/wms/undotbs01.dbf';
set newname for datafile 4  to '/home/upt/oracle/oradata/wms/users01.dbf';
set newname for datafile 5  to '/home/upt/oracle/oradata/wms/wms_data01.dbf';
set newname for datafile 6  to '/home/upt/oracle/oradata/wms/wms_data02.dbf';
set newname for datafile 7  to '/home/upt/oracle/oradata/wms/wms_data03.dbf';
set newname for datafile 8  to '/home/upt/oracle/oradata/wms/wms_index01.dbf';
set newname for datafile 9  to '/home/upt/oracle/oradata/wms/wms_data04.dbf';
set newname for datafile 10 to '/home/upt/oracle/oradata/wms/wms_index02.dbf';
set newname for datafile 11 to '/home/upt/oracle/oradata/wms/wms_data05.dbf';
set newname for datafile 12 to '/home/upt/oracle/oradata/wms/wms_index03.dbf';
set newname for datafile 13 to '/home/upt/oracle/oradata/wms/wms_index04.dbf';
set newname for datafile 14 to '/home/upt/oracle/oradata/wms/wms_data06.dbf';
set newname for datafile 15 to '/home/upt/oracle/oradata/wms/wms_index05.dbf';
set newname for datafile 16 to '/home/upt/oracle/oradata/wms/wms_index06.dbf';
set newname for tempfile 1 to '/home/upt/oracle/oradata/wms/temp01.dbf';
restore database;
switch datafile all;
switch tempfile all;
recover database;
}

--在线日志redo logfile处理
alter database rename file '/home/opt/oracle/oradata/wms/redo04.log' to '/home/upt/oracle/oradata/wms/redo04.log';
alter database clear logfile group 4;
alter database drop logfile group 4;
alter database add logfile group 4 '/home/upt/oracle/oradata/wms/redo04.log' size 100m;
alter database rename file '/home/opt/oracle/oradata/wms/redo05.log' to '/home/upt/oracle/oradata/wms/redo05.log';
alter database clear logfile group 5;
alter database add logfile group 5 '/home/upt/oracle/oradata/wms/redo05.log' size 100m;
alter database rename file '/home/opt/oracle/oradata/wms/redo06.log' to '/home/upt/oracle/oradata/wms/redo06.log';
alter database clear logfile group 6;
alter database add logfile group 6 '/home/upt/oracle/oradata/wms/redo06.log' size 100m;

--升级
SQL>startup upgrade
SQL>@?/rdbms/admin/catupgrd.sql
SQL>@?/rdbms/admin/catalog.sql
SQL>@?/rdbms/admin/catproc.sql
SQL>@?/rdbms/admin/utlrp.sql
SQL>shutdown immediate
SQL>startup
 

阅读原文内容投诉

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

软考中级精品资料免费领

  • 历年真题答案解析
  • 备考技巧名师总结
  • 高频考点精准押题
  • 2024年上半年信息系统项目管理师第二批次真题及答案解析(完整版)

    难度     813人已做
    查看
  • 【考后总结】2024年5月26日信息系统项目管理师第2批次考情分析

    难度     354人已做
    查看
  • 【考后总结】2024年5月25日信息系统项目管理师第1批次考情分析

    难度     318人已做
    查看
  • 2024年上半年软考高项第一、二批次真题考点汇总(完整版)

    难度     435人已做
    查看
  • 2024年上半年系统架构设计师考试综合知识真题

    难度     224人已做
    查看

相关文章

发现更多好内容

猜你喜欢

AI推送时光机
位置:首页-资讯-数据库
咦!没有更多了?去看看其它编程学习网 内容吧
首页课程
资料下载
问答资讯