数据库备份和恢复方案及步骤.doc

  1. 1、本文档共9页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
数据库备份和恢复方案及步骤

操作系统:GNU/Linux 数据库管理系统:Oracle10g 一、安装Recovery Catalog 用dbca创建一个DATABASE catdb,用于存放recovery catalog data [oracle@localhost ~]$dbca 在catdb中创建一个名为rcat_ts的表空间作为用户rman的默认表空间 [oracle@localhost ~]$sqlplus sys/oracle@catdb as sysdba SQL create tablespace rcat_ts; SQL create user rman identified by oracle temporary tablespace temp Default tablespace rcat_ts quota unlimited on rcat_ts; 授予catlog所有者rman recovery_catalog_owner角色,该角色提供给用户所有查询和维护recovery catalog所必需的权限 SQL grant connect,resource,recovery_catalog_owner to rman; 启动rman,以catalog所有者rman登录 [oracle@localhost ~]$rman catalog rman/oracle@catdb RMAN create catalog tablespace rcat_ts; 5,用rman同时连接到target数据库、catalog数据库,在新建的recovery catalog中注册target数据库 [oracle@localhost ~]$rman target sys/oracle@orcl catalog rman/oracle@catdb RMAN register database; 察看已在recovery catalog中注册的target数据库 [oracle@localhost ~]$sqlplus rman/oracle@catdb SQLselect * from db; 配置RMAN ?[oracle@localhost ~]$rman target sys/oracle@orcl catalog rman/oracle@catdb 2,RMAN?show all??(检查配置) ? ?configure default device type to disk? ?( 设置默认的备份的设备为磁盘) ?? ? ?CONFIGURE DEVICE TYPE DISK PARALLELISM BACKUP TYPE TO BACKUPSET; (设置备份的并行级别) ? ?configure channel 1 device type disk format /home/backup_%U??(设置备份文件格式) ? ?configure channel 2 device type disk format /home/oraclebackup_%U??(设置备份文件格式) ? ?configure controlfile autobackup on? ?(打开控制文件的自动备份) ? ?configure controlfile autobackup format for device type disk to ctl_%F (设置控制文件备份格式) . 备份测试 ? ?备份全库?1,同时连接target数据库和recovery catalog数据库 [oracle@localhost ~]$rman target sys/oracle@orcl catalog rman/oracle@catdb 2,RMAN backup database plus archivelog delete input; 3,连接target数据库 [oracle@localhost ~]$sqlplus sys/oracle@orcl as sysdba SQL conn hr/hr; SQL select salary from employees where employee_id=157; SQL update employees set salary =2000 where employee_id=157; SQL commit; SQL select salary from employees where employee_id=157;   四. 恢复测试 [oracle@localhost ~]$sqlplus sys/oracle@orcl as sysdba 2,把target数据库先关闭,然后启动到

文档评论(0)

xcs88858 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8130065136000003

1亿VIP精品文档

相关文档