zoukankan      html  css  js  c++  java
  • 异机恢复perform restores

    Restoring and Recovering the database on a new host
    第一台机器上mount模式下做全备
     
    new host:
     
    1.配置oracle_sid和之前一致
    2.start rman and connect to the target instance in NOCATALOG mode. (rman target / nocatalog)
    rman target /
    <=>
    rman target / nocatalog
    3.set then database identifier(DBID).
    4.start the instance in NOMOUNT mode.
    5.restore the server parameter file from the backup sets.(pfile 传到new host 恢复出spfile)
    6.shutdown the instance.
    7.edit the restored initialization parameter file.
    8.start the instance in NOMOUNT mode.
    9.create a RUN block to :
         - Restore the control file
         - Mount the database
    10.create the rman recovery script to restore and recover the database.
    11.execute the rman script.
    12.open the database with the resetlogs option.
     
    backups 传到new host
    还原spfile
    FRA
    catalog recover area;
    非FRA
    catalog start with '/oradata';
     
    RMAN> run {
    2> restore spfile from autobackup
    3> recovery area = '<flash recovery area destination>'
    4> db_name = '<db_name>';
    5> }
     
    offline的恢复(冷备)
    startup force nomount;
    restore controlfile;
    alter database mount;
    restore database;
    recover database noredo;
    alter database open resetlogs;
     
     

    异机恢复(option)
    从NODE2恢复到NODE1:
    0、环境清理
    登陆NODE1
    shutdown immediate;
    startup mount restrict;
    drop database;
    1、准备三样内容:
    rman target / 获得DBID:758457693
    全库的完整备份(含控制文件、SP文件、归档文件)
    run {
    allocate channel c1 device type disk format '/u01/oradata/newhost/%U';
    backup as compressed backupset database include current controlfile plus archivelog;
    }
    cd /u01/oradata/newhost/
    scp * node4:/u01/oradata/newhost/
    单独将autobackup的spfile&controlfile复制过来。
    2、在node1上完成实例的启动
    关闭ASM实例,释放内存。
    创建目录
    cd /u01/oradata
    mkdir sales arch backup newhost
    mkdir -p /u01/app/oracle/fast_recovery_area/sales
    rman target /
    set dbid 758457693
    startup nomount;
    restore spfile to '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfilesales.ora' from '/u01/oradata/newhost/o1_mf_s_886008933_bv6p3553_.bkp';
    startup nomount force;
    3、完成控制文件的启动
    restore controlfile from '/u01/oradata/newhost/o1_mf_s_886008933_bv6p3553_.bkp';
    alter database mount;
    4、恢复数据库
    catalog start with '/u01/oradata/newhost/';
    restore database;
    SQL > recover database using backup controlfile until cancel;
    SQL > alter database open resetlogs;
  • 相关阅读:
    The kernel’s command-line parameters(1)
    Linux kernel release 5.x <http://kernel.org/>(1)
    2020 LInux Kernel History Report(2)
    2020 LInux Kernel History Report
    Android下拉刷新,上拉加载
    多条目加载和适配器
    PAT:1071. Speech Patterns (25) AC
    PAT:1054. The Dominant Color (20) AC(map法)
    PAT:1054. The Dominant Color (20) AC(抓住最多的特点,处理不同和相同的情况,留下剩余的答案)
    PAT:1060. Are They Equal (25) AC
  • 原文地址:https://www.cnblogs.com/willsun8023/p/5071132.html
Copyright © 2011-2022 走看看