Oracle RMAN
Dave
The important thing in life is to have a great aim and the determination to attain it !
展开
-
RMAN 验证 数据文件 和 备份 的有效性
<br /> <br /> <br />有关备份验证的官网链接如下:<br /> Validating Database Files and Backups<br /> http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmvalid.htm#BRADV90064<br /> <br /> Rman 对数据文件的验证,主要是验证坏块,包括逻辑坏块和物理坏块。关于坏块的说明,参考我的Blog:<br原创 2011-06-02 00:33:00 · 14557 阅读 · 0 评论 -
RMAN 系列(五) ---- RMAN 还原 与 恢复
<br />一. RMAN 还原与恢复基础<br />在RMAN 用于中,还原与恢复是两个不同的概念。 <br />还原(restore):指访问先前生成的备份,从中得到一个或多个对象,然后在磁盘上的某个位置还原这些对象。 <br />恢复(recover):是一个数据库与给定时间点相一致以保证能够打开这个数据库的实际进程,该进程通常是通过应用重做(包括联机重做日志和归档的重做日志)来完成的。<br /><br />数据库中的数据状态对数据库是非常重要的,在数据库启动时要求数据与给定的时间状态一致。 如果数原创 2010-06-28 22:32:00 · 18004 阅读 · 2 评论 -
RMAN 系列(六) ---- RMAN 高级恢复
<br />这几天心情不太好,这周连续加上3天班,有点累,但是不管怎样,学习不能放下,在当下的社会,要改变自己的命运只能靠学习了,有点很无耐,还是专心搞技术吧。 这篇资料主要讲了一下几个知识点:<br /><br />1. 不完全恢复<br />2. 基于RMAN 的恢复主题<br />3. 表空间时间点恢复<br />4. 验证备份可恢复<br />5. 跨平台的数据库移动和RMAN<br /><br /><br />一. 不完全恢复<br />不完全恢复是指不完全的数据恢复,不完全恢复与完全恢复在许多方原创 2010-07-09 00:31:00 · 11293 阅读 · 1 评论 -
RMAN 系列(七) ---- RMAN 维护
<br />这篇资料主要讲到了如下内容:<br />1. Rman 的维护<br />2. 恢复目录的维护<br />3. 备份恢复目录<br />4. RMAN 存储脚本<br />5. 删除数据库<br /> <br /><br /><br />一. RMAN 的维护<br /><br />1.1 交叉效验RMAN 备份<br />在RMAN目录和物理备份目的地不同步的情况下,我们可以使用crosscheck命令来效验控制文件或恢复目录中的RMAN信息是否与备份介质上的实际物理备份集片相同。<br />原创 2010-07-12 09:17:00 · 8501 阅读 · 0 评论 -
RMAN 系列(八) ---- RMAN List和report 命令
<br /><br /><br />一. List 命令<br />RMAN的list命令是一种在数据库控制文件或恢复目录中查询备份的历史信息的方法。列表提供了一组信息,包括从数据库对应物的列表到备份集和归档日志的备份的列表的所有信息。<br /><br />1.1 列出对应物<br />List incarnation 命令为用户提供了目标数据库的每个数据库对应物列表。 如果有必要,可以使用这个列表的信息将数据库恢复到执行最后一条resetlogs命令前的某个时间点。<br />RMAN> list in原创 2010-07-12 09:27:00 · 8998 阅读 · 1 评论 -
RMAN 系列(九) ---- 调整RMAN备份与恢复操作的性能
<br /><br />RMAN 实际上即装即用的,我们通常不需要对其做什么调整。 但是,RMAN 体系结构中还包含许多组件,当这些组件构成一个整体时,就必须调整RMAN的设置以从备份进程中得到最佳的性能。 通常RMAN 调整设计到处理逻辑和物理数据库设计中的低效率,调整介质管理库(Media Management Library: MML), 调整RMAN 和MML 层以备份数据库的物理设备更好地共存。<br /> <br /><br /><br /><br />一. 调整RMAN 前的工作<br />如原创 2010-07-13 20:10:00 · 10101 阅读 · 0 评论 -
Linux 平台下 RMAN 全备 和 增量备份 shell 脚本
一. 一些准备知识Oracle 分归档和非归档模式。 这两者的区别就是对redo log的处理。归档模式下,当一个redo log 写满之后,就会把这个redo log里的内容写入归档文件,等写完之后,这个redo log 就可以继续使用,如果是非归档模式下,redo log 就直接覆盖了。 恢复一般都需要归档文件,这里面记录了对数据库的操作,所以生产库一般都运行在归档模式下。 关于归档模式和非归档模式的切换参考Blog:Oracle 归档与非归档的切换http://blog.csdn.net/tianle原创 2010-07-16 19:51:00 · 27852 阅读 · 4 评论 -
RMAN Crosscheck 和 Delete 命令的2个实例
实例一假如我们在oracle数据库在迁移当中不小心丢失了一个归档文件, 此时RMAN 会因为缺少归档日志而不能完成备份,而且Veritas等备份软件由于归档日志的异常导致归档日志备份失败也是经常碰到的。 解决方法很简单,执行下面2条命令即可:RMAN>crosscheck archivelog all;RMAN>delete expired archivelog all;对这2条命令做一下说明:在controlfile中记录着每一个archivelog的相关信息,当我们在OS下把这些物理文件delete掉原创 2010-07-17 11:58:00 · 11247 阅读 · 0 评论 -
RMAN 复制目标数据库的理论知识
<br /><br />一. RMAN 复制的基础<br /><br />1.1 使用RMAN 复制的原因<br />RMAN 复制是必须的。 我们可以只将控制文件复制到新位置,然后再运行还原与恢复操作。 但是在使用了恢复目录的情况下,如果不使用RMAN复制来复制数据库,就存在许多问题。 由于RMAN 基于数据库的DBID 在恢复目录中注册数据库,因此即使存在同名的数据库(inint.ora 中的DB_NAME参数),数据库ID也能唯一地标识数据库。如果不使用duplicate命令,就会存在具有相同的DBI原创 2010-07-19 16:33:00 · 8548 阅读 · 0 评论 -
RMAN 同机复制数据库
<br /><br />关于RMAN 复制的理论知识,参考我的Blog:<br />RMAN 复制目标数据库的理论知识<br />http://blog.csdn.net/tianlesoftware/archive/2010/07/19/5746812.aspx<br /> <br /><br />实验平台: redhat + oracle 10g<br /><br />源库的相关信息:<br />ORACLE_BASE: /u01/app/oracle<br />ORACLE_HOME: /u01/ap原创 2010-07-19 20:55:00 · 8042 阅读 · 2 评论 -
RMAN 系列(四) ---- RMAN 备份
<br />一. RMAN 备份的一些优点<br />1. RMAN 会检测和报告损坏的数据块。<br />2. 不需要将表空间置入热备份模式,RMAN 就可以连接备份数据库。 热备份期间会额外的生成重做日志。<br />3. RMAN 会自动跟踪新的数据文件和表空间,这样就不再需要在脚本中添加新的表空间和数据文件。<br />4. RMAN 只备份使用过的数据库(直至最高使用标记(High wate mark)),这样RMAN 备份映像通常小于联机备份的备份脚本。<br />5. RMAN 提供备份映像的原创 2010-06-23 00:56:00 · 11375 阅读 · 4 评论 -
RMAN 系列(三) ---- 介质管理问题
<br /><br />Oracle 10g中的RMAN 使用程序主要关注的是将磁盘备份作为介质恢复解决方案的最佳方法。 随着磁盘价格的下跌,大量的存储区网络(Storage Area Network:SAN)已经在很多数据中心找到了永久的存储空间。 随着业务向着价格越来越便宜而容量越来越大的磁盘发展,对RMAN的功能(如Flashback)进行了升级,从而可以最有效的利用可用存储空间。<br />RMAN 备份实用程序是按逻辑执行的过程,而写入到磁盘的操作正是Oracle 数据库所擅长的工作。因此,当Or原创 2010-06-18 17:08:00 · 12001 阅读 · 0 评论 -
RMAN 系列(二) ---- RMAN 设置和配置
<br />一. 配置数据库以ARCHIVELOG 模式运行<br /> 在ORACLE 10g 之前,在将数据库置入Archivelog 模式后,需要启动arch进程。 设置参数LOG_ARCHIVE_START 为true,也可启动arch进程。在10g以后,不需要使用该方法,当数据库处于archivelog模式时,Oracle 会自动启动arch进程。<br />Arch 进程由LGWR 进程调用,只要一个联机redo log 被填满。LGWR 进程就切换到另一个联机redo 组。 此时如果数据库处于原创 2010-06-16 22:14:00 · 17878 阅读 · 0 评论 -
Windows下RMAN备份脚本
Windows 下RMAN备份脚本,比较简单。 我们看内容。 1. 修改RMAN相关参数RMAN>show all;RMAN>CONFIGURE CONTROLFILE AUTOBACKUP ON;RMAN>CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO d:/backup/原创 2010-01-12 14:26:00 · 22017 阅读 · 2 评论 -
RMAN 'Duplicate Database' Feature in 11G [ID 452868.1]
<br /> <br />RMAN 'Duplicate Database' Feature in 11G [ID 452868.1]<br /> <br />Modified 14-MAY-2010 Type BULLETIN Status PUBLISHED<br /> <br />In this Document<br /> Purpose<br /> Scope and Application<br /> RMAN 'Duplicate Database' Feature in原创 2010-12-09 15:30:00 · 4685 阅读 · 0 评论 -
Nocatalog 下的RMAN 增量备份 shell脚本
<br /> <br /> 之前整理了下catalog下全备的脚本,上次在生产库上弄了个nocatalog的脚本,结果没有在本本上保存,这次要用了,重新在整理了一下。<br /> <br />Linux 平台下 RMAN 全备和增量备份 shell 脚本<br />http://blog.csdn.net/tianlesoftware/archive/2010/07/16/5740630.aspx<br /> <br />在执行脚本之前,先修改几个参数值:<br />1. DB 参数:<br /原创 2011-01-26 15:24:00 · 18331 阅读 · 5 评论 -
Advise On How To Improve Rman Performance [ID 579158.1]
<br /> <br />Advise On How To Improve Rman Performance [ID 579158.1]<br /> <br />Modified 17-FEB-2011 Type HOWTO Status PUBLISHED<br /> <br />In this Document<br /> Goal<br /> Solution<br /> ReferencesApplies to: <br />Oracle Server - Enterprise原创 2011-02-17 21:24:00 · 5762 阅读 · 0 评论 -
How to Configure RMAN I/O Block Size to Improve Backup and Recovery Performance [ID 107213.1]
<br />How to Configure RMAN I/O Block Size to Improve Backup and Recovery Performance [ID 107213.1]<br /> <br />Modified 19-OCT-2010 Type BULLETIN Status PUBLISHED<br /> <br /> <br />-----------------------------------------------------------------原创 2011-02-17 21:26:00 · 5490 阅读 · 0 评论 -
RMAN Restore Database Slow / How To Improve RMAN Restore Performance [ID 467694.1]
<br />RMAN Restore Database Slow / How To Improve RMAN Restore Performance [ID 467694.1]<br /> <br />Modified 10-JUN-2010 Type HOWTO Status MODERATED<br /> <br />In this Document<br /> Goal<br /> Solution<br />Platforms: 1-914CU; <br />This docum原创 2011-02-17 21:29:00 · 6450 阅读 · 0 评论 -
RMAN Catalog 和 Nocatalog 的区别
一.Nocatalog Nocatalog方式 就是用control file作为catalog,每一次备份都要往控制文件里面写好多备份信息,控制文件里面会有越来越多的备份信息。因此,当使用rman nocatalog方式备份时,备份controlfile是非常重要的。由于nocatalog时利用controlfile存放备份信息,建议将Oracle参数文件中的CONTROL_FILE_RECORD_KEEP_TIME值加大(缺省为7天), 参数在$ORACLE_HOME/dbs/initSID.ora中,原创 2010-06-02 11:29:00 · 30960 阅读 · 2 评论 -
RMAN 系列(一)---- RMAN 体系结构概述
<br /><br />一. 服务器管理恢复<br />恢复管理器, Recovery Manager, 简陈 RMAN。 RMAN 实现一直服务器管理恢复(Server Managed Recovery: SMR)。 SMR 是一种数据库执行所需要的操作以确保自身备份成功的能力,依赖于Oracle RDBMS 内核中的内置代码可以完成这一功能。 SMR 的功能主要体现在能够减少用户的操作。<br /><br />二. RMAN 使用程序<br />RMAN 是SMR的具体实现,它是Oracle 提供的,R原创 2010-06-09 23:05:00 · 17594 阅读 · 3 评论 -
Oracle RMAN 兼容性 及 不同版本和不同平台之间使用 常见问题说明
一.RMAN Catalog兼容性MOS的文档:RMAN Compatibility Matrix [ID 73431.1] 1.1 About RMAN CompatibilityThe RMAN environment can contain thefollowing components:--RMAN 环境由以下5部分组成:(1) RMAN executable(2) Reco原创 2012-02-03 23:20:24 · 13995 阅读 · 0 评论 -
RMAN 异机 复制数据库
<br /><br /> <br />关于RMAN 复制的理论知识,参考我的Blog:<br />RMAN 复制目标数据库的理论知识<br />http://blog.csdn.net/tianlesoftware/archive/2010/07/19/5746812.aspx<br /><br />RMAN 异机复制和同机复制操作步骤是一样的,不同的是我们需要把备份的文件copy到辅助库上去,而且位置要和目标库上一直,因为备份集的位置是写在控制文件里的。<br /><br />RMAN 同机复制数据库<b原创 2010-07-20 15:46:00 · 14406 阅读 · 0 评论 -
用RMAN复制 搭建 物理 Data Gurad 环境
<br /><br />Data Guard 环境:<br />操作系统: redhat 4.7 <br />Primary数据库:<br />IP地址:10.85.10.1<br />数据库SID:orcl<br />DB_UNIQUE_NAME:orcl_pd<br /> <br />Standby数据库:<br />IP地址:10.85.10.2<br />数据库SID:orcl<br />DB_UNIQUE_NAME:orcl_st<br /><br />Oracle Data Guard 理论知识原创 2010-07-23 01:21:00 · 11892 阅读 · 1 评论 -
Oracle 11g RAC RMAN ORA-00245 control file backup operation failed 错误 与 控制文件备份 说明
一.问题说明操作系统: Redhat 5.8数据库: 11.2.0.32节点RAC. 使用RMAN 备份的时候,报如下错误:ORA-00245: control file backup failed;target is likely on a local file system 这个问题只存在Oracle 11gR2以后的RAC 环境。 二.ORA-245 触发条件在以下的5种环境下,会出现OR原创 2013-02-21 23:12:40 · 27972 阅读 · 0 评论 -
Oracle RMAN 将 备份集 重新 注册到控制文件 说明
一.说明 RMAN 备份分2种,Catalog 和Nocatalog,对于Nocatalog,oracle 会使用控制文件来保存RMAN备份的一些记录。 而且实际上多数也是使用Nocatalog来备份。因为使用Nocatalog比较方便。 但对于使用Nocatalog的情况就会让RMAN 恢复的时候依赖与控制文件中记录的备份的信息。如果不一致,就会导致不能进行有效的恢复。 我们原创 2013-04-22 19:07:43 · 12110 阅读 · 2 评论 -
RAC 之 RMAN 恢复
之前整理的RMAN 有关还原的文章: RMAN 系列(五) ---- RMAN 还原与恢复 http://blog.csdn.net/tianlesoftware/archive/2010/07/11/5700474.aspx RMAN 备份与恢复实例 http://blog.csdn.net/tianlesoftware/archive/2009/10/20/4699320.aspx Oracle Rman跨resetlogs版本恢复原创 2010-09-27 16:03:00 · 10878 阅读 · 0 评论 -
Oracle RMAN Recover中使用BBED 跳过缺失的归档 继续 Recover 的测试
一.背景说明 Oracle RMAN 备份的恢复分2个步骤:RESTRE 和 RECOVER。 在这个过程中,Recover 是依赖与归档文件的。 假设一种情况:周一对数据库做了全备,然后保留归档。周四发现数据库有异常,准备恢复,发现周二的时候少了一个归档。 按照正常的情况,我们只能将数据库恢复到周二缺失归档的之前的点。 那么我这里就是一个研究,如何跳过这个缺失的归档,让数据库继续进行Recov原创 2013-10-21 02:12:49 · 7032 阅读 · 0 评论 -
关于RMAN recover 过程的讨论
<br /> <br /> <br />群里苏州-孤星问了一个问题:<br /> <br />先用RMAN backup database,然后做一些操作,在用backup archvivelog all delete input 备份归档日志并删除备份过的归档日志。那么RMAN 在进行recover的时候,怎么应用备份的归档文件。<br /> <br />我的回答:<br />在进行recover 的时候,会先将备份的归档文件还原到归档目录,然后从这个目录应用归档文件,完成恢复的过程。我们原创 2010-08-25 00:10:00 · 7386 阅读 · 0 评论 -
RMAN 备份异机恢复 并创建新DBID
<br /> <br />测试平台信息:<br />Oracle:11gR2<br />操作系统:Redhat 5.5<br />Target DB:dave<br /> <br />几点说明:<br />(1)RMAN 异机恢复的时候,db_name必须相同。如果说要想改成其他的实例名,可以在恢复成功后,用nid 命令修改。实例名的信息会记录到控制文件里,所以如果在恢复的时候,如果实例名不一致,恢复的时候会报错。<br />(2)如果恢复的路径和源库不一致,就需要在restore时用set 命令指定新位置原创 2011-03-11 19:05:00 · 28289 阅读 · 2 评论 -
用RMAN 备份异机恢复 迁移数据
<br /> <br /> 先假设一种情况,假设有一个数据库,数据量是2T。如果要对这个数据库进行迁移,在不考虑磁盘空间的前提下,要求在最短的时间内完成切换操作。<br /> <br /> 在不考虑磁盘空间前提下,备份时间,网络传输时间,恢复时间。这个时间对于7*24*365的系统来说,肯定是没办法承受的。<br /> 如果在考虑下备份空间+迁移后的空间。这个对磁盘的开销也是非常大。<br /> <br /> 在我的前一篇Blog里,提到了RMAN的异机恢复,原创 2011-03-12 23:42:00 · 21209 阅读 · 1 评论 -
如何 搭建 RMAN 备份平台
一. RMAN 的一些理论知识 RMAN Catalog 和 Nocatalog 的区别http://blog.csdn.net/tianlesoftware/archive/2010/06/02/5641763.aspx RMAN 系列(一)---- RMAN 体系结构概述http://blog.csdn.net/tianlesoftware/archive/2010/06/09/5659701原创 2010-07-16 23:06:00 · 13214 阅读 · 0 评论 -
Oracle Rman 命令详解(List report backup configure)
一、list常用命令总结备忘 list命令列出控制文件、RMAN恢复目录中备份信息, 是我们对所有可见的数据库备份文件的一个最直观的了解的方法 list incarnation; list backup summary; list backup of database summary; list backup of tablespace summary; lis转载 2009-12-10 08:07:00 · 28032 阅读 · 3 评论 -
RMAN-01009: syntax error: found "dot" 解决方法
今天调试一个RMAN 的备份脚本,这个脚本以前也用过很多次,并没有什么问题,今天执行时,就是过不去。 操作系统:Redhat 5.8数据库:11.2.0.3 错误如下:RMAN-00571:===========================================================RMAN-00569: =============== ERROR MESSAGESTACK原创 2013-02-21 21:02:12 · 18064 阅读 · 0 评论 -
Oracle 块修改跟踪 (Block Change Tracking) 说明
Block ChangeTracking 是Oracle 10g里推出的特性。官网对Block change tracking 的定义如下: Adatabase option that causes Oracle to track data file blocks affected by eachdatabase update. The tracking information is原创 2011-11-21 19:03:38 · 22766 阅读 · 0 评论 -
Oracle 11g Data Guard 使用duplicate from active database 创建 standby database
在blog:Oracle 11gR2 使用 RMAN duplicate from active database 复制数据库 http://blog.csdn.net/tianlesoftware/archive/2011/03/08/6230498.aspx演示了11gR2 下duplicate from active database的例子。 在这里继续使用这个命令来创建一个物理原创 2011-03-08 18:13:00 · 25064 阅读 · 4 评论 -
Oracle 使用RMAN 将 DB 从10g 直接 Restore 到11g 示例
随着Oracle 版本的升级,RMAN 也得到增强,在Oracle11g中的RMAN 支持不同操作系统和不同DB 之前的使用,关于RMAN 的兼容性,参考:Oracle RMAN 兼容性 及 不同版本和不同平台之间使用 常见问题说明http://blog.csdn.net/tianlesoftware/article/details/7232602 这篇Blog 演示一个linux 下10g 恢复原创 2012-03-02 10:13:27 · 23415 阅读 · 0 评论 -
关于 RMAN 备份 数据块 一致性的讨论
<br /> <br />今天和 杭州恒生 的一个朋友讨论一个RMAN 在备份时数据块一致性的问题。<br /> <br />关于RMAN 的备份原理参考blog:<br /> RMAN 系列(一)---- RMAN 体系结构概述 <br />http://blog.csdn.net/tianlesoftware/archive/2010/06/09/5659701.aspx<br /> <br /> <br /><br /> <br />先看官方文档上的一段话:<br /> <br />Consis原创 2010-08-10 00:06:00 · 10427 阅读 · 2 评论 -
RMAN backup recovery area 命令
一朋友问我一个问题:RMAN> BACKUP RECOVERY AREA; 这个命令备份哪些内容,还真不太清楚。Google了一下。这个命令是备份Flash recovery Area的内容的。这是也是Oracle 10g以后才有的。10g引进了flash recovery area,同时在rman备份中支持对该区域的备份。在9i中oracle引入flashback查询,依赖于undo表空间存储的信息来闪回查询以前的版本,当然这个受限于undo表空间的大小,以及保留策略。在10g中oracle又引入了新的f原创 2010-08-12 13:53:00 · 9921 阅读 · 1 评论 -
Oracle 使用RMAN COPY 移动 整个数据库 位置 示例
一.数据迁移说明在DBA的工作中会遇到数据迁移的情况,比如将本地磁盘迁移到ASM,亦或者需要更换存储设备,那么我就需要迁移整个数据库的存储位置。 如果只是移动表空间或者数据文件,我们可以将表空间或者数据文件offline 之后,移动位置,在用alter database rename 和alter tablespace rename 来将位置的变化写入控制文件即可。 (1)按数据文件来:1.先将相原创 2012-03-07 13:48:49 · 9269 阅读 · 0 评论