



全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
NBU Rman异机恢复Oracle2009-05-12 00:30背景:HostA上oracle通过NBU进行RMAN备份至带库,从HostB上恢复该库; 目的:在丢失了一部分数据的情况下,但因为没有足够的空间不能做整库恢复,只想恢复部分表; so假设:源主机HostA,目标主机HostB,NBUMaster主机Po,Oracle_sid均为test, Oracle用户均为ora。 步骤: 1、增加Po主机上文件 Po:root#touch /usr/openv/netbackup/db/altnames/No.Restrictions /取消nbu的异机恢复限制 2、修改Po主机上文件,修改参数 Po:root#vi /usr/openv/netbackup/bp.conf FORCE_RESTORE_MEDIA_SERVER = HostA HostB 这步需要重启netbackup 下面开始恢复步骤(均为ora用户操作) 3、copy spfile 在HostA上test数据库的pfile(create pfile from spfile)ftp至HostB中的 $ORACLE_HOME/db下 4、HostB上,密码文件、相应的dump目录 HostB:ora#orapwd file= password= entries= HostB:ora#mkdir $admin/test/*dump 5、启动数据库至nomount HostB:ora#sqlplus / as sysdba Connected to an idle instance. SQL startup nomount ORACLE instance started. Total System Global Area 1526726656 bytes Fixed Size 2191720 bytes Variable Size 1430245016 bytes Database Buffers 83886080 bytes Redo Buffers 10403840 bytes 6、登录catalog,进行rman恢复 HostB:ora#rman target / catalog user/pwdrman connected to target database: TEST (not mounted) connected to recovery catalog database 7、set dbid(HostA上test库的dbid) RMAN set dbid=2091611406 executing command: SET DBID database name is TEST and DBID is 2091611406 8、恢复control file RMAN RUN 2 ALLOCATE CHANNEL D1 TYPE sbt_tape; 3 send NB_ORA_SERV=Po,NB_ORA_CLIENT=HostA; /一定需要NB_ORA_CLIENT,否则找不到介质4 RESTORE CONTROLFILE; 5 RELEASE CHANNEL D1; 6 allocated channel: D1 channel D1: sid=166 devtype=SBT_TAPE channel D1: VERITAS NetBackup for Oracle - Release 6.0 (2006110304) sent command to channel: D1 Starting restore at 2009-05-11:21:24:58 channel D1: starting datafile backupset restore channel D1: restoring control file channel D1: reading from backup piece c-3381955389-20090511-02 channel D1: restored backup piece 1 piece handle=c-3381955389-20090511-02 tag=TAG20090511T170809 channel D1: restore complete, elapsed time: 00:01:47 output filename=/test/control01.ctl output filename=/test/control02.ctl output filename=/test/control03.ctl Finished restore at 2009-05-11:21:26:56 released channel: D1 9、控制文件修复成功,将库alter至mount状态 RMAN alter database mount; database mounted 10、恢复数据库 RMAN run 2 ALLOCATE CHANNEL D1 TYPE SBT_TAPE; 3 send NB_ORA_SERV=Po,NB_ORA_CLIENT=HostA; 4 restore database skip tablespace users;/屏蔽不想恢复的users表空间 6 recover database SKIP FOREVER TABLESPACE users; 5 RELEASE CHANNEL D1; 7 allocated channel: D1 channel D1: sid=44 devtype=SBT_TAPE channel D1: VERITAS NetBackup for Oracle - Release 6.0 (2006110304) sent command to channel: D1 Starting restore at 2009-05-11:21:46:50 channel D1: starting datafile backupset restore channel D1: specifying datafile(s) to restore from backup set restoring datafile 00003 to /test/sysaux01.dbf channel D1: reading from backup piece bk_2_1_686595521 channel D1: restored backup piece 1 piece handle=bk_2_1_686595521 tag=HOT_DB_BK_LEVEL0 channel D1: restore complete, elapsed time: 00:02:26 channel D1: starting datafile backupset restore channel D1: specifying datafile(s) to restore from backup set restoring datafile 00001 to /test/system01.dbf channel D1: reading from backup piece bk_1_1_686595521 channel D1: restored backup piece 1 piece handle=bk_1_1_686595521 tag=HOT_DB_BK_LEVEL0 channel D1: restore complete, elapsed time: 00:02:57 channel D1: starting datafile backupset restore channel D1: specifying datafile(s) to restore from backup set restoring datafile 00002 to /test/undotbs01.dbf channel D1: reading from backup piece bk_3_1_686595521 channel D1: restored backup piece 1 piece handle=bk_3_1_686595521 tag=HOT_DB_BK_LEVEL0 channel D1: restore complete, elapsed time: 00:01:55 Finished restore at 2009-05-11:21:54:23 Starting recover at 2009-05-11:21:54:24 starting media recovery channel D1: starting archive log restore to default destination channel D1: restoring archive log archive log thread=1 sequence=5 channel D1: reading from backup piece al_8_1_686595863 channel D1: restored backup piece 1 piece handle=al_8_1_686595863 tag=TAG20090511T170423 channel D1: restore complete, elapsed time: 00:01:57 archive log filename=/oracle10/app/oracle/product/10.2.0/dbs/arch1_5_686569151.dbf thread=1 sequence=5 unable to find archive log archive log thread=1 sequence=6 released channel: D1 RMAN-00571: = RMAN-00569: = ERROR MESSAGE STACK FOLLOWS = RMAN-00571: = RMAN-03002: failure of recover command at 05/11/2009 21:56:39 RMAN-06054: media recovery requesting unknown log: thread 1 seq 6 lowscn 608603 recover成功,因为没有恢复归档,所以会报一些错,这里忽略。 11,open数据库 RMAN alter database open resetlogs; database opened new incarnation of database registered in recovery catalog starting full resync of recovery catalog full resync complete 数据库打开成功,over! 一些tips: 1、pfile参数需要修改,否则起库可能会报错,内存等参数肯定在恢复库的时候不会设置的和生产库一样大 SQL startup nomount ORA-00439: feature not enabled: Real Application Clusters (恢复rac的时候,要删掉一些rac库的参数) SQL startup nomount ORA-27154: post/wait create failed ORA-27300: OS system dependent operation:semget failed with status: 28 ORA-27301: OS failure message: No space left on device ORA-27302: failure occurred at: sskgpcreates (这个错可能与process、sessions、主机信号量等参数有关) 2、设置错了NB_ORA_CLIENT或是原数据库文件所在目录没有创建,在restore控制文件或数据文件的时候都会报这个错 ORA-19511: Error received from media manager layer, error text: Backup file not found in NetBackup catalog 3、设置名字或位置 set newname for datafile filename or filenumber to newlocation ; 设置时间 set until time to_date(12/8/2004 14:00:00,mm/dd/yyyy hh24:mi:ss); 4、restore database skip table
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 江苏司法考试真题及答案
- 单招宪法考试题库及答案
- 2025年高中模拟地理试卷及答案
- 2025年研学旅行指导员、师资格证考试题库含完整答案【全国】
- 2025年医院消防应急预案演练脚本(2篇)
- 2025年康复治疗技术中级考试真题及答案
- 2025年甘肃省教育系统后备干部考试参考试题(含答案)
- 2025年四级上册语文期末试卷及答案
- 2025年关于名著的考试题及答案
- 2025年农村社会保障与发展考试试卷及答案
- GYK运行记录智能分析系统研究
- 计划生育服务站劳动合同
- GB/T 44757-2024钛及钛合金阳极氧化膜
- 2024-2025学年广东省深圳市宝安区富源学校九年级(上)第一次月考数学试卷(含答案)
- 红领巾爱祖国 星星火炬耀成长主题班会2
- 中国地级市经纬度-精确版
- 07SG111-1 建筑结构加固施工图设计表示方法
- DB44-T 2474-2024 自然教育标识设置指引
- 2022年高考全国Ⅰ卷语文真题及参考答案-全国Ⅰ卷
- 2024年成都温江兴蓉西城市运营集团有限公司招聘笔试冲刺题(带答案解析)
- 天津市普通高中学业水平考试英语词汇表
评论
0/150
提交评论