[20171130]关于rman的一些总结.txt

--//最近一直做rman相关测试,测试那个乱,没办法.无法从周围的人获得帮助,纯粹是自己的乱猜,乱测,不知道别人是否能看懂我写的东西.
--//有必要做一些总结,不一定对,仅仅是我当前的看法.

1.数据文件备份集中,文件头是最后写到备份集文件的.
2.使用备份集恢复也是一样,文件头也是最好写入的.
3.以上情况对as copy的方式也是一样.

--//oracle这样操作主要目的保证备份是好的可用,反之恢复也是一样.

4.关于备份参数filesperset,最好选择1(我自己的认为这样比较好,缺点当然是备份文件显得有点多),如果觉得备份文件太多,建议选择4,
  次之选择8,大于8.我个人不建议选择.
5.关于rman备份的input or output memory buffer问题,我直接摘录一段:

Oracle RMAN 11g Backup and Recovery.pdf

作者:Robert G. Freeman Matthew Hart
页数:689
出版社:Mc graw hill
出版号: ISBN: 978-0-07-162861-7
        MHID: 0-07-162861-4

RMAN in Memory P80

RMAN builds buffers in memory through which it streams data blocks for potential backup. This
memory utilization counts against the total size of the PGA and, sometimes, the SGA. There are
two kinds of memory buffers. Input buffers are the buffers that are filled with data blocks read
from files that are being backed up. Output buffers are the buffers that are filled when the
memory-to-memory write occurs to determine whether a particular block needs to be backed up.
When the output buffer is filled, it is written to the backup location. The memory buffers differ
depending on whether you are backing up to or restoring from disk or tape. Figure 2-3 illustrates
input and output buffer allocation. It illustrates a backup of two datafiles being multiplexed into
a single backup set.
       
Input Memory Buffers
    When you are backing up the database, the size and number of input memory buffers depend on
the exact backup command being executed. Primarily, they depend on the number of files being
multiplexed into a single backup. Multiplexing refers to the number of files that will have their
blocks backed up to the same backup piece. To keep the memory allocation within reason, the
following rules are applied to the memory buffer sizes based on the number of files being backed
up together:

■ If the number of files going into the backup set is four or less, then RMAN allocates four
   buffers per file at 1MB per buffer. The total will be 16MB or less.
■ If the number of files going into the backup set is greater than four, but no greater than
   eight, then each file gets four buffers, each of 512KB. This ensures that the total remains
   at 16MB or less.
■ If the number of files being multiplexed is greater than eight, then RMAN allocates four
   buffers of size 128KB. This ensures that each file being backed up will account for 512KB
   of buffer memory.

Bear in mind that these memory amounts are on a per-channel basis. So, if you allocate two
channels to back up a database with 32 datafiles, for instance, then RMAN will load-balance the
files between the two channels and may not end up with 16 files per channel. If some files are
significantly larger than others, you may end up with only 8 files going into one backup set and
24 files going into the other. If this were the case, then the buffers for the first channel with 8 files
would allocate 16MB of memory for input buffers (four buffers multiplied by 512KB each, multiplied
by 8 files), and the second channel would allocate 12MB of memory buffers (512KB per file
multiplied by 24 files).
    You can use the following query to monitor the size of buffers on a per-file basis while the
backup is running:

SELECT set_count, device_type, type, filename, buffer_size, buffer_count, open_time, close_time
  FROM v$backup_async_io
ORDER BY set_count, type, open_time, close_time;

--//注意:原来有这个问题!下次备份注意看buffer_size!

Output Buffers When Backing Up to Disk P81
    In addition to input buffers, RMAN allocates output buffers, depending on what the output source
is. If you are backing up to disk, then RMAN allocates output buffers that must fill up with data blocks
from the input buffers before being flushed to the backup piece on your file system. Per channel,
there will be four output buffers, each of which is 1MB. So, the memory footprint per channel will
always be 4MB.

Output Memory Buffers When Backing Up to Tape P81
    Memory allocation is different when backing up to tape, to account for the slower I/O rates
that we expect from tape devices. When you are backing up to or restoring from tape, RMAN
allocates four buffers per channel process, each of which is 256KB, so that the total memory
footprint per channel is 1MB.

6.关于写入备份集顺序问题.我个人认为至少对于单个数据文件应该按照顺序写入.

7.文件头损坏,dbv与rman检查无效,感觉都是坏块,使用如下命令无效!!
RMAN> recover datafile 6 block 1;
RMAN> blockrecover datafile 6 block 1;

8.另外在备份期间如果有脏块写盘:会在一些视图中记录数据块的最高scn,这样确定如果不完全恢复scn在文件头与最高scn之间情况,
  不会选择这个备份,而且如果catalog,oracle不会扫描备份集合或者备份image,确定最高的scn.
--//as copy备份记录在,例子:
select recid,file#,NAME,CHECKPOINT_CHANGE#,ABSOLUTE_FUZZY_CHANGE# from v$datafile_copy where recid=33 ;
--//备份集可以查询,例子:
select file#,CHECKPOINT_CHANGE#,ABSOLUTE_FUZZY_CHANGE# from v$backup_datafile;

9.疑问:
--//上个星期做了rman copy备份与数据文件变化的测试.
--//在做rman copy备份时数据文件增大,链接:http://blog.itpub.net/267265/viewspace-2147642/
http://blog.itpub.net/267265/viewspace-2147673/
--//提到检查备份copy image时发现没有BBBBB,CCCC字串.
--//我的猜测oracle 做映像备份与建立备份集一样,也是根据数据文件位图区确定读取那些数据块,这样在备份开始后新建立的块不会备份.
$ strings /home/oracle/backup/sugar01.dbf | grep "AAAA" |wc
100000  170040 3624077
$ strings /home/oracle/backup/sugar01.dbf | grep "BBBB" |wc
      0       0       0
$ strings /home/oracle/backup/sugar01.dbf | grep "CCCC" |wc
      0       0       0

--//后记:这是我当时的理解,实际上应该是错误的.有必要做一些的测试.自己看着都觉得乱!!

--//在做rman copy备份时数据文件减少的情况下,链接:http://blog.itpub.net/267265/viewspace-2147673/
--//而我在减少文件大小后:
SCOTT@book> ALTER DATABASE DATAFILE '/mnt/ramdisk/book/sugar01.dbf' RESIZE 9M ;
Database altered.

$ strings /home/oracle/backup/sugar01.dbf_yyy |grep "BBBBB" |wc
  62394  106045 2256986

$ strings /home/oracle/backup/sugar01.dbf_yyy |grep "CCCC" |wc
      0       0       0

[20171130]关于rman的一些总结.txt相关推荐

  1. RMAN详细教程(二) —— 备份、检查、维护、恢复

    一.创建增量备份 增量备份级别为0-4,但为方便备份管理,oracle建议只限于0级和1级. 1.差异增量备份(differential incremental backup)(默认): 每次备份至上 ...

  2. Data Guard的搭建过程

    一.创建物理备库 1.启用强制日志 SQL> alter database force logging; 2.配置备用重做日志及归档位置 (1)查看联机重做日志组的数量和大小 (2)配置备用重做 ...

  3. [20161031]rman备份与数据文件OS块.txt

    [20161031]rman备份与数据文件OS块.txt --每个数据文件都有一个OS块,位于数据文件的第1块(也是0块).通过bbed无法访问: BBED> set dba 7,0 BBED- ...

  4. [20160704]Block recover using RMAN.txt

    [20160704]Block recover using RMAN.txt --总结一下使用rman恢复坏块. 1.环境: SCOTT@book> @ &r/ver1 PORT_STR ...

  5. [20190718]12c rman新特性 表恢复.txt

    [20190718]12c rman新特性 表恢复.txt --//12c rman 支持一个新特性,恢复表在某个时间或者scn号. --//实际上11g以前支持到表空间级别,12c更加近一步,通过简 ...

  6. [20171122]rman filesystemio_options.txt

    [20171122]rman备份与参数filesystemio_options设置.txt --//这几天写了几篇filesystemio_options参数设置的文章,单独测试这个参数对rman备份 ...

  7. [20150309]使用冷备份做恢复的问题.txt

    [20150309]使用冷备份做恢复的问题.txt --做一个例子,说明冷备份做不完全恢复的问题. 1.测试环境: SCOTT@test> @ &r/ver1 PORT_STRING   ...

  8. [20170728]oracle保留字.txt

    [20170728]oracle保留字.txt --//oracle有许多保留字,我印象最深的就是使用rman备份表空间test,test就是rman里面的保留字. --//还有rman也是rman里 ...

  9. Windows下oracle RMAN备份脚本

    Windows 下RMAN备份脚本,比较简单.我们看内容. 1.      修改RMAN相关参数 RMAN>show all; RMAN>CONFIGURE CONTROLFILE AUT ...

最新文章

  1. 上传图片配置控制大小_esp32-cam拍照上传云平台,http协议传输
  2. 如何高效开发端智能算法?MNN 工作台 Python 调试详解
  3. DCGAN及其TensorFlow源码
  4. 【mathematical statistics】5 distributional testing
  5. OpenJudge 2796: 数字求和
  6. localStorage存、取数组
  7. Python sqlalchemy orm 多外键关联
  8. 论文笔记(Attentive Recurrent Social Recommendation)
  9. 网页无障碍php,【译】开发无障碍的Web组件
  10. Educational Codeforces Round 39 F Largest Beautiful Number
  11. 【SQL】substr截取结果和想象中有差异?
  12. Python-Matplotlib 12 多图figure
  13. python collections模块(队列)
  14. ios查看帧率的软件_查看iOS屏幕帧数MGFPSStatus
  15. matlab拟合函数导出,excel里曲线拟合的公式怎么导出?()
  16. java设置word图片居中_Word中怎样快速对齐图片?这样操作,效率提升10倍
  17. java 股票指标算法库_股票K线指标算法整理(Java封装工具类,K线指标算法工具类)...
  18. 名表依波路borel_依波路手表排名 依波路手表世界排名第几
  19. 通配符 或 怎么浓_浓咖啡的咖啡渣新鲜度
  20. 5款高质量app界面ui设计实例欣赏

热门文章

  1. docker基础应用
  2. 201671030130+词频统计软件项目报告
  3. 析构函数和动态内存管理
  4. 【玩转Eclipse】——eclipse实现代码块折叠-类似于VS中的#region……#endregion
  5. 复习知识点:UITableView和UICollectionView的常用属性
  6. 最新最详细最简洁Eclipse调试PHP配置详解(Xdebug,Zend Debugger)
  7. 段错误产生原因及简单的调试方法
  8. mysql使用字符函数length,获取参数值的字节个数
  9. Mac下安装jdk8
  10. Linus系统下查看系统版本