- 浏览: 901900 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
yaawaas:
有了 。。
程序员装B指南 -
niepeng880208:
藐视我还是初级装
程序员装B指南 -
sa364867195:
哥们,现在实现了吗?
GPS卫星定位车辆监控系统 -
月下小人:
顶,这才是质的提高,果断顶
一个基于jQuery ajax和.net httphandler 的超轻异步框架,千行代码完成。 -
xp9802:
有意思,动静结合
程序员装B指南
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 闪回特性(FLASHBACK DATABASE)
Oracle 闪回特性(FLASHBACK DROP & RECYCLEBIN)
Oracle 闪回特性(Flashback Query、Flashback Table)
Oracle 闪回特性(Flashback Version、Flashback Transaction)
有关基于用户管理的备份和备份恢复的概念请参考
Oracle 基于用户管理恢复的处理(详细描述了介质恢复及其处理)
有关RMAN的恢复与管理请参考
相关推荐
在Windows环境下,RMAN备份脚本可能包含与操作系统相关的路径和命令,如`@run.sql`这样的SQL*Plus脚本调用。使用`rman_backup_script_win`这个文件名,我们可以推测这是一个专门为Windows平台设计的RMAN备份脚本。 ...
RMAN> backup tablespace system plus archivelog delete input; 八、备份归档日志 使用backup archivelog命令备份所有归档日志: RMAN> backup archivelog all delete input; 九、复制数据文件 使用copy data...
本文详细讲解了 RMAN 的备份机制以及如何备份,涵盖了数据库备份和 RMAN 备份的概念、RMAN 备份的类型、备份集和镜像副本、备份路径、备份限制等知识点。 一、数据库备份与 RMAN 备份的概念 数据库备份是指将...
当数据库出现问题时,我们可以使用RMAN来恢复数据库。我们可以使用以下命令来恢复数据库: `RMAN> shutdown immediate;` `RMAN> startup nomount;` `RMAN> restore database;` 这将恢复整个数据库,包括控制文件...
RMAN 异地恢复、备份路径不一样时数据库恢复 RMAN 异地恢复是指在不同的服务器或存储设备上恢复数据库的备份。这种恢复方式需要在不同的服务器或存储设备上创建软连接、恢复控制文件、重命名数据文件和日志文件、...
Oracle 11g R2 的 RMAN (Recovery Manager) 是 Oracle 数据库管理系统中的一个关键工具,主要用于数据库的备份和恢复。RMAN 提供了一种高效且灵活的方式来管理和保护数据库,确保在数据丢失或系统故障时能够快速恢复...
1. 数据库恢复:当数据库损坏时,使用RMAN的RESTORE和RECOVER命令恢复数据文件和控制文件。 2. 表空间恢复:针对特定表空间进行恢复,不影响其他表空间。 3. 文件恢复:如果单个数据文件丢失,可以单独恢复该文件。 ...
在使用RMAN进行备份和恢复时,需要将数据库修改为自动归档模式。为什么需要这样做呢?主要是因为,如果不设置为自动归档模式,使用RMAN时需要把数据库修改到mount状态,而不是open状态。而自动归档模式是可以在open...
3. 在操作中,指定Oracle的`sqlplus`或`rman`命令行工具,并传递备份脚本的路径作为参数。 六、监控和维护 执行自动备份后,应定期检查备份成功与否,以及备份空间的使用情况。可以使用RMAN的`list backup`和`...
该教程旨在教你如何使用ORACLE RMAN实现异地备份,解决了由于数据量急剧增加、备份和恢复的困难问题。通过使用RMAN和EXP/IMP工具,用户可以实现本地数据库的异地备份,避免服务器空间不足的问题。 知识点一:异地...
### RMAN备份与恢复知识点详解 #### 一、进入RMAN **1.1 连接本地数据库** 在Oracle环境中,可以通过以下两种方式连接到本地数据库: - 直接输入`rman target /` - 或者简写为`rman` 这种方式会提示用户输入...
使用RMAN进行备份时,应根据实际需求配置相应的参数,例如保留策略、优化选项、备份设备类型、备份目标路径等,以确保备份的有效性和恢复的简便性。RMAN的强大之处在于它能够自动化许多备份和恢复过程,并能灵活适应...
为了能够使用RMAN进行备份,首先需要确保数据库处于归档模式。如果数据库当前不是归档模式,则需要通过以下步骤将其转换为归档模式: 1. **启动SQLPlus**: `%sqlplus /nolog` 2. **以DBA身份连接数据库**: `SQL> ...
三、rman备份演练初级篇 四、rman备份演练进阶篇 五、rman外传-基础资料篇1 六、实战rman备份 七、rman外传-基础资料篇2 八、演练rman恢复 九、实战rman恢复(1)丢失控制文件的恢复 十、实战rman恢复(2)恢复到异机 11...
本文将详细介绍如何使用RMAN来制定Oracle数据库的备份策略,包括设置归档模式、创建备份脚本以及设置自动化的备份计划。 #### 二、设置数据库归档模式 为了实现RMAN备份,首先需要确保数据库处于归档模式。归档模式...
- 执行全库备份,例如:`run { backup database plus archivelog; }` - 针对特定表空间或文件备份,如:`backup tablespace users;` - 恢复操作,可能涉及`switch`、`recover`等命令。 在实际应用中,遇到问题可...
2. 配置备份通道:使用 RMAN 工具配置备份通道,指定备份的设备类型、格式和路径。 3. 启动备份:使用 RMAN 工具启动备份操作,备份数据库、归档日志和控制文件等。 4. 删除归档日志:使用 RMAN 工具删除归档日志...
ORACLE 数据库 RMAN 备份恢复是指使用 ORACLE 的 Recovery Manager(RMAN)工具对数据库进行备份和恢复的过程。RMAN 是 ORACLE 数据库管理系统中的一种备份和恢复工具,能够对数据库进行全备、增备、差异备、日志备...
- **镜像副本**:备份时创建数据文件的副本,提高数据安全性。 - **备份到磁带**:除了硬盘,RMAN也支持备份到磁带设备。 - **RMAN脚本**:编写RMAN脚本自动化备份过程。 **四、RMAN与Linux环境的结合** 在Linux下...