• Rman使用catalog start with恢复


    RMAN> startup nomount;
    RMAN> restore controlfile from  '/data01/testdb_CF_c-3148051840-20110813-00';  # 从控制文件备份集恢复控制文件
    RMAN> alter database mount;

    catalog start with '/data01/';      (一定要用“/”结尾,不然找不到真实的路径)
    allocate channel c2 type disk;
    allocate channel c3 type disk;
    run{
    allocate channel c1 type disk;
    set newname for datafile '/oracle/wk/data/wk001/system01.dbf' to '/oradata/wk001/system01.dbf';
    set newname for datafile '/oracle/wk/data/wk001/sysaux01.dbf' to '/oradata/wk001/sysaux01.dbf';
    set newname for datafile '/oracle/wk/data/wk002/undotbs01.dbf' to '/oradata/wk002/undotbs01.dbf';
    set newname for datafile '/oracle/wk/data/wk002/ppdbptcindex01.dbf' to '/oradata/wk002/ppdbptcindex01.dbf';
    set newname for datafile '/oracle/wk/data/wk001/ppdbptcdata01.dbf' to '/oradata/wk001/ppdbptcdata01.dbf';
    set newname for datafile '/oracle/wk/data/wk002/PP_DATA_1M01.dbf' to '/oradata/wk002/PP_DATA_1M01.dbf';
    set newname for datafile '/oracle/wk/data/wk002/pp_data_10m01.dbf' to '/oradata/wk002/pp_data_10m01.dbf';
    set newname for datafile '/oracle/wk/data/wk002/pp_data_10m02.dbf' to '/oradata/wk002/pp_data_10m02.dbf';
    set newname for datafile '/oracle/wk/data/wk001/pp_index_1m01.dbf' to '/oradata/wk001/pp_index_1m01.dbf';
    set newname for datafile '/oracle/wk/data/wk001/pp_index_10m01.dbf' to '/oradata/wk001/pp_index_10m01.dbf';
    set newname for datafile '/oracle/wk/data/wk002/pp_data_128k01.dbf' to '/oradata/wk002/pp_data_128k01.dbf';
    set newname for datafile '/oracle/wk/data/wk001/pp_index_128k01.dbf' to '/oradata/wk001/pp_index_128k01.dbf';
    set newname for datafile '/oracle/wk/data/wk002/aq_data01.dbf' to '/oradata/wk002/aq_data01.dbf';
    set newname for tempfile '/oracle/wk/data/wk001/temp01.dbf' to '/oradata/wk001/temp01.dbf';
    logfile
    group 1 ('/oradata/wk001/redo01a.dbf','/oradata/wk002/redo01b.dbf') size 50m,
    group 2 ('/oradata/wk001/redo02a.dbf','/oradata/wk002/redo02b.dbf') size 50m,
    group 3 ('/oradata/wk001/redo03a.dbf','/oradata/wk002/redo03b.dbf') size 50m;
    restore database force;
    switch datafile all;
    }

  • 相关阅读:
    android studio快捷键大全
    HTML5规范尘埃落定,5个开发工具推荐
    javascript:设置URL参数的方法,适合多条件查询
    MyBatis 多表联合查询及优化
    js动态向页面中添加表格
    mysql装完电脑里面没mysql相关服务
    javascript 实现一个网页,然后计算出有多少剩余时间的倒计时程序
    xcode于Archive当产生安装包遇到ld: library not found for -lPods
    计算机网络 2. 应用层
    Android手游《》斗地主完整的源代码(支持单机和网络对战)
  • 原文地址:https://www.cnblogs.com/godspeed034/p/7404223.html
Copyright © 2020-2023  润新知