zoukankan      html  css  js  c++  java
  • Rman将数据文件恢复到不同的路径

    RMAN> startup nomount
     
    connected to target database (not started)
    Oracle instance started
     
    Total System Global Area     289406976 bytes
     
    Fixed Size                     1219016 bytes
    Variable Size                 79693368 bytes
    Database Buffers             205520896 bytes
    Redo Buffers                   2973696 bytes
     
    RMAN> restore controlfile from autobackup ;
     
    Starting restore at 20-JAN-13
    using channel ORA_DISK_1
     
    recovery area destination: /u01/oracle/flash_recovery_area
    database name (or database unique name) used for search: ORCL
    channel ORA_DISK_1: autobackup found in the recovery area
    channel ORA_DISK_1: autobackup found: /u01/oracle/flash_recovery_area/ORCL/autobackup/2013_01_20/o1_mf_s_805243193_8hr0ftx5_.bkp
    channel ORA_DISK_1: control file restore from autobackup complete
    output filename=/u01/oracle/oradata/orcl/control01.ctl
    output filename=/u01/oracle/oradata/orcl/control02.ctl
    output filename=/u01/oracle/oradata/orcl/control03.ctl
    Finished restore at 20-JAN-13
     
     
    RMAN> alter database mount ;
     
    database mounted
    released channel: ORA_DISK_1
     
     
     
     
    RMAN> run{
    2> set newname for datafile  1  to    '/home/oracle/system01.dbf' ;
    3> set newname for datafile  2  to    '/home/oracle/undotbs01.dbf';
    4> set newname for datafile  3  to    '/home/oracle/sysaux01.dbf';
    5> set newname for datafile  4  to    '/home/oracle/users01.dbf';
    6> set newname for datafile  5  to    '/home/oracle/example01.dbf';
    7> restore database ;
    8> switch datafile all ;
    9> recover database ;
    10> }
     
    executing command: SET NEWNAME
    using target database control file instead of recovery catalog
     
    executing command: SET NEWNAME
     
    executing command: SET NEWNAME
     
    executing command: SET NEWNAME
     
    executing command: SET NEWNAME
     
    Starting restore at 20-JAN-13
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=159 devtype=DISK
     
    channel ORA_DISK_1: starting datafile backupset restore
    channel ORA_DISK_1: specifying datafile(s) to restore from backup set
    restoring datafile 00001 to /home/oracle/system01.dbf
    restoring datafile 00002 to /home/oracle/undotbs01.dbf
    restoring datafile 00003 to /home/oracle/sysaux01.dbf
    restoring datafile 00004 to /home/oracle/users01.dbf
    restoring datafile 00005 to /home/oracle/example01.dbf
    channel ORA_DISK_1: reading from backup piece /u01/oracle/flash_recovery_area/ORCL/backupset/2013_01_20/o1_mf_nnndf_TAG20130120T223858_8hr0d2lr_.bkp
    channel ORA_DISK_1: restored backup piece 1
    piece handle=/u01/oracle/flash_recovery_area/ORCL/backupset/2013_01_20/o1_mf_nnndf_TAG20130120T223858_8hr0d2lr_.bkp tag=TAG20130120T223858
    channel ORA_DISK_1: restore complete, elapsed time: 00:01:05
    Finished restore at 20-JAN-13
     
    datafile 1 switched to datafile copy
    input datafile copy recid=17 stamp=805245722 filename=/home/oracle/system01.dbf
    datafile 2 switched to datafile copy
    input datafile copy recid=18 stamp=805245722 filename=/home/oracle/undotbs01.dbf
    datafile 3 switched to datafile copy
    input datafile copy recid=19 stamp=805245722 filename=/home/oracle/sysaux01.dbf
    datafile 4 switched to datafile copy
    input datafile copy recid=20 stamp=805245722 filename=/home/oracle/users01.dbf
    datafile 5 switched to datafile copy
    input datafile copy recid=21 stamp=805245722 filename=/home/oracle/example01.dbf
     
    Starting recover at 20-JAN-13
    using channel ORA_DISK_1
     
    starting media recovery
     
    archive log thread 1 sequence 6 is already on disk as file /u01/oracle/oradata/orcl/redo02.log
    archive log filename=/u01/oracle/oradata/orcl/redo02.log thread=1 sequence=6
    media recovery complete, elapsed time: 00:00:04
    Finished recover at 20-JAN-13
     
     
    RMAN> alter database open resetlogs ;
     
    database opened

  • 相关阅读:
    Tomcat服务器安装、配置、测试
    Java开发环境配置
    文件-第12章-《数据结构题集》习题解析-严蔚敏吴伟民版
    12-1-顺序文件归并-文件-第12章-《数据结构》课本源码-严蔚敏吴伟民版
    外部排序-第11章-《数据结构题集》习题解析-严蔚敏吴伟民版
    11-2-置换-选择排序-外部排序-第11章-《数据结构》课本源码-严蔚敏吴伟民版
    11-1-败者树-外部排序-第11章-《数据结构》课本源码-严蔚敏吴伟民版
    内部排序-第10章-《数据结构题集》习题解析-严蔚敏吴伟民版
    10-12-顺序表地址排序-内部排序-第10章-《数据结构》课本源码-严蔚敏吴伟民版
    10-11-基数排序-内部排序-第10章-《数据结构》课本源码-严蔚敏吴伟民版
  • 原文地址:https://www.cnblogs.com/hftian/p/9288265.html
Copyright © 2011-2022 走看看