RMAN 备份路径困惑(使用plus archivelog时)

--*******************************************

-- RMAN 备份困惑(使用plus archivelog)

--*******************************************

 

 

  最近RMAN备份时,碰到一点疑惑。即使用plus archivelog 时不管是使用format参数指定备份文件的路径还是使用configure配置RMAN备份路径,都不能

将数据文件和日志文件备份到同一路径。在因为以前使用RMAN备份,都是单独备份数据文件和日志文件,所以一直没有在意这个问题。下面给出具体事例。

 

一、指定备份路径备份数据库及归档日志

  RMAN> backup database format '/u01/bk/bk_db_%U' plus archivelog; 

 

  Starting backup at 02-MAY-11

  current log archived

  allocated channel: ORA_DISK_1

  channel ORA_DISK_1: sid=146 devtype=DISK

  channel ORA_DISK_1: starting archive log backupset

  channel ORA_DISK_1: specifying archive log(s) in backup set

  input archive log thread=1 sequence=50 recid=10 stamp=750091269

  input archive log thread=1 sequence=51 recid=11 stamp=750091281

  input archive log thread=1 sequence=52 recid=12 stamp=750091286

  input archive log thread=1 sequence=53 recid=13 stamp=750092325

  input archive log thread=1 sequence=54 recid=14 stamp=750092487

  input archive log thread=1 sequence=55 recid=15 stamp=750093621

  input archive log thread=1 sequence=56 recid=16 stamp=750094799

  input archive log thread=1 sequence=57 recid=17 stamp=750095198

  input archive log thread=1 sequence=58 recid=18 stamp=750099671

  input archive log thread=1 sequence=59 recid=19 stamp=750099848

  input archive log thread=1 sequence=60 recid=20 stamp=750099945

  input archive log thread=1 sequence=61 recid=21 stamp=750103678

  channel ORA_DISK_1: starting piece 1 at 02-MAY-11

  channel ORA_DISK_1: finished piece 1 at 02-MAY-11

  piece handle=/u01/app/oracle/flash_recovery_area/ODBP/backupset/2011_05_02/           --归档日志放在了

     o1_mf_annnn_TAG20110502T180758_6vx0mzl2_.bkp tag=TAG20110502T180758 comment=NONE

  channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02

  Finished backup at 02-MAY-11

 

  Starting backup at 02-MAY-11

  using channel ORA_DISK_1

  channel ORA_DISK_1: starting full datafile backupset

  channel ORA_DISK_1: specifying datafile(s) in backupset

  input datafile fno=00001 name=/u01/app/oracle/oradata/odbp/system01.dbf

  input datafile fno=00002 name=/u01/app/oracle/oradata/odbp/undotbs01.dbf

  input datafile fno=00003 name=/u01/app/oracle/oradata/odbp/sysaux01.dbf

  input datafile fno=00004 name=/u01/app/oracle/oradata/odbp/users01.dbf

  channel ORA_DISK_1: starting piece 1 at 02-MAY-11

  channel ORA_DISK_1: finished piece 1 at 02-MAY-11

  piece handle=/u01/bk/bk_db_1dmbbb40_1_1 tag=TAG20110502T180800 comment=NONE         --据文件存放在了指定的路

  channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45

  channel ORA_DISK_1: starting full datafile backupset

  channel ORA_DISK_1: specifying datafile(s) in backupset

  input datafile fno=00001 name=/u01/app/oracle/oradata/odbp/system01.dbf

  input datafile fno=00002 name=/u01/app/oracle/oradata/odbp/undotbs01.dbf

  input datafile fno=00003 name=/u01/app/oracle/oradata/odbp/sysaux01.dbf

  input datafile fno=00004 name=/u01/app/oracle/oradata/odbp/users01.dbf

  channel ORA_DISK_1: starting piece 1 at 02-MAY-11

  channel ORA_DISK_1: finished piece 1 at 02-MAY-11

  piece handle=/u01/app/oracle/flash_recovery_area/ODBP/backupset/2011_05_02/         --据文件同也存放在了

     o1_mf_nnndf_TAG20110502T180800_6vx0og2z_.bkp tag=TAG20110502T180800 comment=NONE

  channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45

  channel ORA_DISK_1: starting full datafile backupset

  channel ORA_DISK_1: specifying datafile(s) in backupset

  including current control file in backupset

  including current SPFILE in backupset

  channel ORA_DISK_1: starting piece 1 at 02-MAY-11

  channel ORA_DISK_1: finished piece 1 at 02-MAY-11

  piece handle=/u01/bk/bk_db_1fmbbb6r_1_1 tag=TAG20110502T180800 comment=NONE        --控制文件和spfile存放到了指定路

  channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02

  channel ORA_DISK_1: starting full datafile backupset

  channel ORA_DISK_1: specifying datafile(s) in backupset

  including current control file in backupset

  including current SPFILE in backupset

  channel ORA_DISK_1: starting piece 1 at 02-MAY-11

  channel ORA_DISK_1: finished piece 1 at 02-MAY-11

  piece handle=/u01/app/oracle/flash_recovery_area/ODBP/backupset/2011_05_02/        --控制文件和spfile同也保存到了

     o1_mf_ncsnf_TAG20110502T180800_6vx0pycl_.bkp tag=TAG20110502T180800 comment=NONE

  channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

  Finished backup at 02-MAY-11

 

  Starting backup at 02-MAY-11

  current log archived

  using channel ORA_DISK_1

  channel ORA_DISK_1: starting archive log backupset

  channel ORA_DISK_1: specifying archive log(s) in backup set

  input archive log thread=1 sequence=62 recid=22 stamp=750103776

  channel ORA_DISK_1: starting piece 1 at 02-MAY-11

  channel ORA_DISK_1: finished piece 1 at 02-MAY-11

  piece handle=/u01/app/oracle/flash_recovery_area/ODBP/backupset/2011_05_02/       --归档日志放在了

    o1_mf_annnn_TAG20110502T180936_6vx0q1dg_.bkp tag=TAG20110502T180936 comment=NONE

  channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02

  Finished backup at 02-MAY-11

 

--备份据文件、控制文件等信息

  [oracle@odbp 2011_05_02]$ ls -hltr

  total 703M

  -rw-r----- 1 oracle oinstall 4.5M May  2 18:08 o1_mf_annnn_TAG20110502T180758_6vx0mzl2_.bkp

  -rw-r----- 1 oracle oinstall 691M May  2 18:09 o1_mf_nnndf_TAG20110502T180800_6vx0og2z_.bkp

  -rw-r----- 1 oracle oinstall 6.9M May  2 18:09 o1_mf_ncsnf_TAG20110502T180800_6vx0pycl_.bkp

  -rw-r----- 1 oracle oinstall  15K May  2 18:09 o1_mf_annnn_TAG20110502T180936_6vx0q1dg_.bkp

  [oracle@odbp 2011_05_02]$ ls -hltr /u01/bk

  total 698M

  -rw-r----- 1 oracle oinstall 691M May  2 18:08 bk_db_1dmbbb40_1_1

  -rw-r----- 1 oracle oinstall 6.9M May  2 18:09 bk_db_1fmbbb6r_1_1

 

从上面的情况来看,

  1.当指定了db_recovery_file_dest参数为 /u01/app/oracle/flash_recovery_area时,则归档日志被备份到此目录。

  2.在参数db_recovery_file_dest参数为闪回区时,则数据文件与控制文件及spfile被使用了双重备份。                                                

 

 

--RMAN配置信息缺省,未做任何

  RMAN> show all;

 

  RMAN configuration parameters are:

  CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default

  CONFIGURE BACKUP OPTIMIZATION OFF; # default

  CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default

  CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default

  CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default

  CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default

  CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

  CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

  CONFIGURE MAXSETSIZE TO UNLIMITED; # default

  CONFIGURE ENCRYPTION FOR DATABASE OFF; # default

  CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default

  CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default

  CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/10g/dbs/snapcf_odbp.f'; # default

 

--db_recovery_file_dest参数置空

  SQL> alter system set db_recovery_file_dest='';  

 

  System altered.

 

二、再次使用RMAN进行备份

  RMAN> backup database format '/u01/bk/bk_db_%U' plus archivelog;

 

  Starting backup at 02-MAY-11

  current log archived

  using target database control file instead of recovery catalog

  allocated channel: ORA_DISK_1

  channel ORA_DISK_1: sid=138 devtype=DISK

  channel ORA_DISK_1: starting archive log backupset

  channel ORA_DISK_1: specifying archive log(s) in backup set

  input archive log thread=1 sequence=50 recid=10 stamp=750091269

  input archive log thread=1 sequence=51 recid=11 stamp=750091281

  input archive log thread=1 sequence=52 recid=12 stamp=750091286

  input archive log thread=1 sequence=53 recid=13 stamp=750092325

  input archive log thread=1 sequence=54 recid=14 stamp=750092487

  input archive log thread=1 sequence=55 recid=15 stamp=750093621

  input archive log thread=1 sequence=56 recid=16 stamp=750094799

  input archive log thread=1 sequence=57 recid=17 stamp=750095198

  input archive log thread=1 sequence=58 recid=18 stamp=750099671

  input archive log thread=1 sequence=59 recid=19 stamp=750099848

  input archive log thread=1 sequence=60 recid=20 stamp=750099945

  input archive log thread=1 sequence=61 recid=21 stamp=750103678

  input archive log thread=1 sequence=62 recid=22 stamp=750103776

  input archive log thread=1 sequence=63 recid=23 stamp=750104981

  channel ORA_DISK_1: starting piece 1 at 02-MAY-11

  channel ORA_DISK_1: finished piece 1 at 02-MAY-11

  piece handle=/u01/app/oracle/10g/dbs/1imbbccm_1_1 tag=TAG20110502T182942 comment=NONE --归档日志备份位于$ORACLE_HOME/dbs

  channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02

  Finished backup at 02-MAY-11

 

  Starting backup at 02-MAY-11

  using channel ORA_DISK_1

  channel ORA_DISK_1: starting full datafile backupset

  channel ORA_DISK_1: specifying datafile(s) in backupset

  input datafile fno=00001 name=/u01/app/oracle/oradata/odbp/system01.dbf

  input datafile fno=00002 name=/u01/app/oracle/oradata/odbp/undotbs01.dbf

  input datafile fno=00003 name=/u01/app/oracle/oradata/odbp/sysaux01.dbf

  input datafile fno=00004 name=/u01/app/oracle/oradata/odbp/users01.dbf

  channel ORA_DISK_1: starting piece 1 at 02-MAY-11

  channel ORA_DISK_1: finished piece 1 at 02-MAY-11

  piece handle=/u01/bk/bk_db_1jmbbcco_1_1 tag=TAG20110502T182944 comment=NONE             --据文件存放在了指定的路

  channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55

  channel ORA_DISK_1: starting full datafile backupset

  channel ORA_DISK_1: specifying datafile(s) in backupset

  input datafile fno=00001 name=/u01/app/oracle/oradata/odbp/system01.dbf

  input datafile fno=00002 name=/u01/app/oracle/oradata/odbp/undotbs01.dbf

  input datafile fno=00003 name=/u01/app/oracle/oradata/odbp/sysaux01.dbf

  input datafile fno=00004 name=/u01/app/oracle/oradata/odbp/users01.dbf

  channel ORA_DISK_1: starting piece 1 at 02-MAY-11

  channel ORA_DISK_1: finished piece 1 at 02-MAY-11

  piece handle=/u01/app/oracle/10g/dbs/1kmbbceg_1_1 tag=TAG20110502T182944 comment=NONE--据文件同也存放在$ORACLE_HOME/dbs

  channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55

  channel ORA_DISK_1: starting full datafile backupset

  channel ORA_DISK_1: specifying datafile(s) in backupset

  including current control file in backupset

  including current SPFILE in backupset

  channel ORA_DISK_1: starting piece 1 at 02-MAY-11

  channel ORA_DISK_1: finished piece 1 at 02-MAY-11

  piece handle=/u01/bk/bk_db_1lmbbcg7_1_1 tag=TAG20110502T182944 comment=NONE             --控制文件及spfile备份位于指定路

  channel ORA_DISK_1: backup set complete, elapsed time: 00:00:05

  channel ORA_DISK_1: starting full datafile backupset

  channel ORA_DISK_1: specifying datafile(s) in backupset

  including current control file in backupset

  including current SPFILE in backupset

  channel ORA_DISK_1: starting piece 1 at 02-MAY-11

  channel ORA_DISK_1: finished piece 1 at 02-MAY-11

  piece handle=/u01/app/oracle/10g/dbs/1mmbbcgc_1_1 tag=TAG20110502T182944 comment=NONE--归档日志文件备份位于$ORACLE_HOME/dbs

  channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

  Finished backup at 02-MAY-11

 

  Starting backup at 02-MAY-11

  current log archived

  using channel ORA_DISK_1

  channel ORA_DISK_1: starting archive log backupset

  channel ORA_DISK_1: specifying archive log(s) in backup set

  input archive log thread=1 sequence=64 recid=24 stamp=750105102

  channel ORA_DISK_1: starting piece 1 at 02-MAY-11

  channel ORA_DISK_1: finished piece 1 at 02-MAY-11                         --控制文件及spfile也存放在$ORACLE_HOME/dbs

  piece handle=/u01/app/oracle/10g/dbs/1nmbbcge_1_1 tag=TAG20110502T183142 comment=NONE

  channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02

  Finished backup at 02-MAY-11

 

从上面的情况来看,

  1.当db_recovery_file_dest参数为空值时,则归档日志,控制文件及spfile被备份到$ORACLE_HOME/dbs路径下

  2.数据文件及控制文件同样实现了双重备份,一份位于$ORACLE_HOME/dbs路径下,一份位于用户指定路径下

 

三、如何将归档日志文件,控制文件,spfile文件以及数据文件备份到同一路径下,

 

  RMAN> run{

  2> allocate channel ch1 device type disk;

  3> allocate channel ch2 device type disk;

  4> backup database format '/u01/bk/bk_db_%U'

  5> plus archivelog format '/u01/bk/bk_lg_%U';

  6> release channel ch1;

  7> release channel ch2;}

 

  using target database control file instead of recovery catalog

  allocated channel: ch1

  channel ch1: sid=141 devtype=DISK

 

  allocated channel: ch2

  channel ch2: sid=148 devtype=DISK

 

  Starting backup at 02-MAY-11

  current log archived

  channel ch1: starting archive log backupset

  channel ch1: specifying archive log(s) in backup set

  input archive log thread=1 sequence=59 recid=19 stamp=750099848

  input archive log thread=1 sequence=60 recid=20 stamp=750099945

  input archive log thread=1 sequence=61 recid=21 stamp=750103678

  input archive log thread=1 sequence=62 recid=22 stamp=750103776

  input archive log thread=1 sequence=63 recid=23 stamp=750104981

  input archive log thread=1 sequence=64 recid=24 stamp=750105102

  input archive log thread=1 sequence=65 recid=25 stamp=750767326

  input archive log thread=1 sequence=66 recid=26 stamp=750769794

  channel ch1: starting piece 1 at 02-MAY-11

  channel ch2: starting archive log backupset

  channel ch2: specifying archive log(s) in backup set

  input archive log thread=1 sequence=50 recid=10 stamp=750091269

  input archive log thread=1 sequence=51 recid=11 stamp=750091281

  input archive log thread=1 sequence=52 recid=12 stamp=750091286

  input archive log thread=1 sequence=53 recid=13 stamp=750092325

  input archive log thread=1 sequence=54 recid=14 stamp=750092487

  input archive log thread=1 sequence=55 recid=15 stamp=750093621

  input archive log thread=1 sequence=56 recid=16 stamp=750094799

  input archive log thread=1 sequence=57 recid=17 stamp=750095198

  input archive log thread=1 sequence=58 recid=18 stamp=750099671

  channel ch2: starting piece 1 at 02-MAY-11

  channel ch1: finished piece 1 at 02-MAY-11

  piece handle=/u01/bk/bk_lg_1ombvlk3_1_1 tag=TAG20110510T110954 comment=NONE     --归档日志存放到指定路

  channel ch1: backup set complete, elapsed time: 00:00:03

  channel ch2: finished piece 1 at 02-MAY-11

  piece handle=/u01/bk/bk_lg_1pmbvlk3_1_1 tag=TAG20110510T110954 comment=NONE     --归档日志存放到指定路

  channel ch2: backup set complete, elapsed time: 00:00:03

  Finished backup at 02-MAY-11

 

  Starting backup at 02-MAY-11

  channel ch1: starting full datafile backupset

  channel ch1: specifying datafile(s) in backupset

  input datafile fno=00001 name=/u01/app/oracle/oradata/odbp/system01.dbf

  input datafile fno=00003 name=/u01/app/oracle/oradata/odbp/sysaux01.dbf

  channel ch1: starting piece 1 at 02-MAY-11

  channel ch2: starting full datafile backupset

  channel ch2: specifying datafile(s) in backupset

  input datafile fno=00002 name=/u01/app/oracle/oradata/odbp/undotbs01.dbf

  input datafile fno=00004 name=/u01/app/oracle/oradata/odbp/users01.dbf

  channel ch2: starting piece 1 at 02-MAY-11

  channel ch2: finished piece 1 at 02-MAY-11

  piece handle=/u01/bk/bk_db_1rmbvlk7_1_1 tag=TAG20110510T110958 comment=NONE     --据文件存放到指定路

  channel ch2: backup set complete, elapsed time: 00:01:09

  channel ch2: starting full datafile backupset

  channel ch2: specifying datafile(s) in backupset

  including current control file in backupset

  channel ch2: starting piece 1 at 02-MAY-11

  channel ch2: finished piece 1 at 02-MAY-11

  piece handle=/u01/bk/bk_db_1smbvlmd_1_1 tag=TAG20110510T110958 comment=NONE     --据文件存放到指定路

  channel ch2: backup set complete, elapsed time: 00:00:07

  channel ch2: starting full datafile backupset

  channel ch2: specifying datafile(s) in backupset

  including current SPFILE in backupset

  channel ch2: starting piece 1 at 02-MAY-11

  channel ch2: finished piece 1 at 02-MAY-11

  piece handle=/u01/bk/bk_db_1tmbvlml_1_1 tag=TAG20110510T110958 comment=NONE    --控制文件,spfile文件存放到指定路

  channel ch2: backup set complete, elapsed time: 00:00:08

  channel ch1: finished piece 1 at 02-MAY-11

  piece handle=/u01/bk/bk_db_1qmbvlk7_1_1 tag=TAG20110510T110958 comment=NONE

  channel ch1: backup set complete, elapsed time: 00:01:31

  Finished backup at 02-MAY-11

 

  Starting backup at 02-MAY-11

  current log archived

  channel ch1: starting archive log backupset

  channel ch1: specifying archive log(s) in backup set

  input archive log thread=1 sequence=67 recid=27 stamp=750769890

  channel ch1: starting piece 1 at 02-MAY-11

  channel ch1: finished piece 1 at 02-MAY-11

  piece handle=/u01/bk/bk_lg_1umbvln2_1_1 tag=TAG20110510T111130 comment=NONE

  channel ch1: backup set complete, elapsed time: 00:00:02

  Finished backup at 02-MAY-11

 

  released channel: ch1

 

  released channel: ch2

 

四、总结(RMAN备份路径)

  1.在未通过configure命令设定RMAN备份文件路径以及未修改db_recovery_file_dest,且指定了format参数,则备份的数据文件,参数文件,

    控制文件,采用了双重保护方式,一份位于指定路径,一份位于缺省的闪回区。同时归档日志保存在闪回区。

  2.一旦修改了db_recovery_file_dest至特定路径,则同上述功能一样,所不同的是存放到非缺省的闪回区。

  3.当db_recovery_file_dest为空值时,同样使用双重保护,但这些文件被放置到了$ORACLE_HOME/dbs路径下。

  4.当使用了configure channel device type disk format = '/u01/bk/db_%U'配置RMAN,则对于badkup database plus archivelog同样会出现上

    述的情况。

  5.如果指定了configure channel device type disk format = '/u01/bk/db_%U',则单独备份数据文件和日志文件不存在问题,都会存放在指定路径。

  6.在同一条命令来完成(badkup database plus archivelog)则需要单独指定数据文件和日志文件的位置,如下方式:

    backup database format '/u01/bk/bk_db_%U'

      plus archivelog format '/u01/bk/bk_lg_%U'

五、更多参考

 

有关性能优化请参考

Oracle 硬解析与软解析

共享池的调整与优化(Shared pool Tuning)

Buffer cache 的调整与优化(一)

Oracle 表缓存(caching table)的使用

 

有关闪回特性请参考

Oracle 闪回特性(FLASHBACK DATABASE)

Oracle 闪回特性(FLASHBACK DROP & RECYCLEBIN)

Oracle 闪回特性(Flashback Query、Flashback Table)

Oracle 闪回特性(Flashback Version、Flashback Transaction)

 

有关基于用户管理的备份和备份恢复的概念请参考

Oracle 冷备份

Oracle 热备份

Oracle 备份恢复概念

Oracle 实例恢复

Oracle 基于用户管理恢复的处理(详细描述了介质恢复及其处理)

 

有关RMAN的恢复与管理请参考

RMAN 概述及其体系结构

RMAN 配置、监控与管理

RMAN 备份详解

RMAN 还原与恢复

 

 

时间: 2024-12-02 18:27:23

RMAN 备份路径困惑(使用plus archivelog时)的相关文章

linux 下RMAN备份shell脚本

       RMAN备份对于Oracle数据库的备份与恢复简单易用,成本低廉.对于使用非catalog方式而言,将RMAN脚本嵌入到shell脚本,然后再通过crontab来实现中小型数据库数据库备份无疑是首选.本文提供了一个简单易用的基于linux shell下的RMAN备份脚本供参考.大家可根据自己的需要进行适当调整.   RMAN备份相关方面的知识较多,可以参考:    RMAN 概述及其体系结构    RMAN 配置.监控与管理    RMAN 备份详解    RMAN 还原与恢复  

Oracle数据库rman备份计划及恢复

原文:http://www.cnblogs.com/vijayfly/p/5045175.html 1.rman完全恢复的前提条件:历史的datafile,controlfile和spfile备份,加上完整的archivelog和完好的redolog. 2.rman备份脚本: a.RMAN 0级备份命令: run{ allocate channel c1 type disk; allocate channel c2 type disk; allocate channel c3 type disk

ORACLE rman备份之ORA-19809 ORA-19804

    2016年3月8日,接到某综合网管系统负责人申告,该系统RMAN备份失败,RMAN备份失败日志如下: 操作系统:REDHAT linux 5.6 数据库版本:11.2.0.3channel ORA_DISK_1: starting piece 1 at 07-MAR-16 RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/07/2016 11:36:24 ORA-19809: limit exceeded

RMAN备份时RMAN-06059错误的处理

上周因为DATAGUARD系统空间满,导致紧急删除了部分未应用的归档日志, 事后通过RMAN提取主库中ASM的归档日志到本地磁盘,运行了如下命令: RMAN> copy archivelog '+DATA/log/archivelog/rman2_5585_697238176.dbf' to '/u01/rman2_5585_697238176.dbf'; 然后FTP到DATAGUARD服务器并激活日志应用,使得DATAGUARD系统日志得以完全恢复, 但后续在主库的RMAN备份中发现了归档日志

备份恢复4.3——rman备份恢复综合演练

1. 检查数据库模式:   sqlplus /nolog     conn /as sysdba    archive log list (查看数据库是否处于归档模式中)    若为非归档,则修改数据库归档模式.    startup mount    alter database archivelog    alter database open 2.连接到target数据库 命令: connect target  /  (connect target system/oracle@ora10g

RMAN 备份详解

--====================== -- RMAN 备份详解 --======================   一.数据库备份与RMAN备份的概念         1.数据库完全备份:按归档模式分为归档和非归档         归档模式             打开状态,属于非一致性备份             关闭状态,可以分为一致性和非一致性         非归档模式             打开状态,非一致性备份无效             关闭状态,一致性备份,非一致

数据库备份与RMAN备份

1.数据库完全备份:按归档模式分为归档和非归档 (1)归档模式 打开状态,属于非一致性备份 关闭状态,可以分为一致性和非一致性 (2)非归档模式 打开状态,非一致性备份无效 关闭状态,一致性备份,非一致性备份不被推荐 2.RMAN备份 RMAN使用服务器会话来完成备份操作,从RMAN客户端连接到服务器将产生一个服务器会话 RMAN备份内容包括:整个数据库,表空间,数据文件,指定的数据文件,控制文件,归档日志文件,参数文件等 3.RMAN备份的类型 完整备份(full) 或增量备份(increme

Oracle RMAN备份(四)副本

八. 副本 8.1 映像副本的介绍 RMAN 可以创建数据库数据文件,归档重做日志或者控制文件的精确副本. Rman 副本是这些文件的副本,区别仅仅在于名称和位置上的变化.我们不 需要考虑备份片或其他问题. 映像副本只能在磁盘上生成,且不能生成增量副本. 生成映像副本必须加载或打开数据库.生成副本的历史记录保存 在数据库控制文件中.所以我们可以跟踪副本生成的时间和驻留的位置. 类似与常规备份,可以建立整个数据库,表空间或数据文件的映像副本. RMAN 复制过程提供一些和普通RMAN 备份集相同的

Oracle RMAN备份(三)联机RMAN 数据库备份

七. 联机RMAN 数据库备份 7.1 联机数据库备份 要使用RMAN执行联机备份操作,数据库必须置于Archivelog 模式. 如果不在归档模式,则尝试联机备份时RMAN就会生成一个错误. Oracle 归档与非归档的切换 http://blog.csdn.net/tianlesoftware/archive/2009/10/19/4693470.aspx 连接备份示例: RMAN> Configure default device type to disk; RMAN> configur